现在的位置: 首页 > 综合 > 正文

javascript项目常用代码集锦

2013年03月23日 ⁄ 综合 ⁄ 共 840字 ⁄ 字号 评论关闭

//滚动

  function _switch()
{
 var temp_tiltle = "";
 temp_title = cTrim(scroll_switch.innerHTML,0);
 if(temp_title =="[停止滚动]")
 {
  move.style.visibility  ="hidden";
  scroll_switch.innerHTML="[开始滚动]";
  scroll_switch.style.color = "#ffffff";
 }
 else
 {
  move.style.visibility  ="visible";
  scroll_switch.innerHTML="[停止滚动]";
  scroll_switch.style.color = "#990000";
 }
}
function stopScroll()
{
 move.scrollAmount =0;
}
function startScroll()
{
 move.scrollAmount = 3;
}

//*//调用方法

<table>

<td width="8%">
   <span id="scroll_switch" onClick="_switch();"  style="cursor:hand; color:#990000; background-color:#CCCCCC;" >
    [停止滚动]
   </span>
  </td>
        <td valign="bottom"  onMouseOver="stopScroll();" onMouseOut="startScroll();" >
         <MARQUEE id="move" direction=left  SCROLLDELAY="100" title="[滚动提示]" style="cursor:hand;" SCROLLAMOUNT = 3 width="680" height=15 >
         
         </MARQUEE>
  </td></table>

抱歉!评论已关闭.