| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2126 人关注过本帖
标题:谁答出送7位号码qq
只看楼主 加入收藏
wobushishe
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2005-4-3
收藏
 问题点数:0 回复次数:11 
谁答出送7位号码qq

谁帮忙把这个垂直滚动字幕加上鼠标移动到上面就停止的功能? <script language="JavaScript1.2">

/* Pausing updown message scroller- Last updated: 99/07/05 (Bugs fixed, ability to specify background image for scroller) ?Dynamic Drive (www.dynamicdrive.com) For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use, visit dynamicdrive.com */

//这里配置滚动字幕的属性 var scrollerwidth=540 var scrollerheight=20 var scrollerbgcolor='#f4f4f4' //set below to '' if you don't wish to use a background image var scrollerbackground='scrollerback.gif'

//修改下面的文字及文字所指向的链接 var messages=new Array() messages[0]="<font face='Arial'>公告1</font>" messages[1]="<font face='Arial'><a href=# target=_blank>公告2</a></font>" messages[2]="<font face='Arial'><a href=# target=_blank>公告3</a></font>"

///////不要修改下面的内容///////////////////////

if (messages.length>1) i=2 else i=0

function move1(whichlayer){ tlayer=eval(whichlayer) if (tlayer.top>0&&tlayer.top<=5){ tlayer.top=0 setTimeout("move1(tlayer)",3000) setTimeout("move2(document.main.document.second)",3000) return } if (tlayer.top>=tlayer.document.height*-1){ tlayer.top-=5 setTimeout("move1(tlayer)",100) } else{ tlayer.top=scrollerheight tlayer.document.write(messages[i]) tlayer.document.close() if (i==messages.length-1) i=0 else i++ } }

function move2(whichlayer){ tlayer2=eval(whichlayer) if (tlayer2.top>0&&tlayer2.top<=5){ tlayer2.top=0 setTimeout("move2(tlayer2)",3000) setTimeout("move1(document.main.document.first)",3000) return } if (tlayer2.top>=tlayer2.document.height*-1){ tlayer2.top-=5 setTimeout("move2(tlayer2)",100) } else{ tlayer2.top=scrollerheight tlayer2.document.write(messages[i]) tlayer2.document.close() if (i==messages.length-1) i=0 else i++ } }

function move3(whichdiv){ tdiv=eval(whichdiv) if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){ tdiv.style.pixelTop=0 setTimeout("move3(tdiv)",3000) setTimeout("move4(second2)",3000) return } if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){ tdiv.style.pixelTop-=5 setTimeout("move3(tdiv)",100) } else{ tdiv.style.pixelTop=scrollerheight tdiv.innerHTML=messages[i] if (i==messages.length-1) i=0 else i++ } }

function move4(whichdiv){ tdiv2=eval(whichdiv) if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){ tdiv2.style.pixelTop=0 setTimeout("move4(tdiv2)",3000) setTimeout("move3(first2)",3000) return } if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){ tdiv2.style.pixelTop-=5 setTimeout("move4(second2)",100) } else{ tdiv2.style.pixelTop=scrollerheight tdiv2.innerHTML=messages[i] if (i==messages.length-1) i=0 else i++ } }

function startscroll(){ if (document.all){ move3(first2) second2.style.top=scrollerheight second2.style.visibility='visible' } else if (document.layers){ document.main.visibility='show' move1(document.main.document.first) document.main.document.second.top=scrollerheight+5 document.main.document.second.visibility='show' } }

window.onload=startscroll

</script>

<style type="text/css"> <!-- body { margin-left: 20px; margin-top: 6px; background-color: #f4f4f4; } --> </style><ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight}; bgColor=&{scrollerbgcolor}; background=&{scrollerbackground}; visibility=hide> <layer id="first" left=0 top=1 width=&{scrollerwidth};> <script language="JavaScript1.2"> if (document.layers) document.write(messages[0]) </script> </layer><layer id="second" left=0 top=0 width=&{scrollerwidth}; visibility=hide> <script language="JavaScript1.2"> if (document.layers) document.write(messages[1]) </script> </layer></ilayer><script language="JavaScript1.2"> if (document.all){ document.writeln('<span id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hiden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">') document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:0">') document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0;top:1;">') document.write(messages[0]) document.writeln('</div>') document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0;top:0;visibility:hidden">') document.write(messages[1]) document.writeln('</div>') document.writeln('</div>') document.writeln('</span>') } </script>

搜索更多相关主题的帖子: 鼠标 号码 scroller dynamicdrive 
2005-04-03 23:23
suyongtao
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:33
帖 子:8674
专家分:127
注 册:2004-11-6
收藏
得分:0 
太长了,没事了帮你看看

面朝大海,春暖花开!
2005-04-04 08:36
哈马拟
Rank: 1
等 级:新手上路
帖 子:270
专家分:0
注 册:2004-7-15
收藏
得分:0 
提供个思路:

利用“行为”为〈layer〉标记添加行为,使其在鼠标移动到其上面时延时若干时间(也即“停止”)

但是这种设计只能在IE中有效!!!

2005-04-04 11:27
wobushishe
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2005-4-3
收藏
得分:0 
谁帮帮忙了,万分感谢。
谁帮忙做一下,我找了好多论坛都没人弄得来呀
2005-04-04 12:49
bingxue2332
Rank: 3Rank: 3
等 级:新手上路
威 望:6
帖 子:446
专家分:0
注 册:2004-11-6
收藏
得分:0 
[CODE]&lt;div id="marquees"&gt;
  &lt;a href="javascript:"&gt;1.你可曾有过无数的梦想,&lt;/a&gt;&lt;br&gt;
  &lt;br&gt;
  &lt;a href="javascript:"&gt;2.却在时光的流逝里幻灭 .&lt;/a&gt;&lt;br&gt;
  &lt;br&gt;
  &lt;a href="javascript:"&gt;3.你可曾对未来期待憧憬,&lt;/a&gt;&lt;br&gt;
  &lt;br&gt;
  &lt;a href="javascript:"&gt;4.却在成长的岁月中迷失.&lt;/a&gt;&lt;br&gt;
  &lt;br&gt;
&lt;/div&gt;
&lt;script language="JavaScript"&gt;
marqueesHeight=140;
stopscroll=false;
with(marquees){
  style.width=0;
  style.height=marqueesHeight;
  style.overflowX="visible";
  style.overflowY="hidden";
  noWrap=true;
  onmouseover=new Function("stopscroll=true");
  onmouseout=new Function("stopscroll=false");
}
document.write('&lt;div id="templayer" style="position:absolute;z-index:1;visibility:hidden"&gt;&lt;/div&gt;');
preTop=0; currentTop=0;
function init(){
  templayer.innerHTML="";
  while(templayer.offsetHeight&lt;marqueesHeight){
    templayer.innerHTML+=marquees.innerHTML;
  }
  marquees.innerHTML=templayer.innerHTML+templayer.innerHTML;
  setInterval("scrollUp()",30);//越大越慢
}
document.body.onload=init;
function scrollUp(){
  if(stopscroll==true) return;
  preTop=marquees.scrollTop;
  marquees.scrollTop+=1;
  if(preTop==marquees.scrollTop){
    marquees.scrollTop=templayer.offsetHeight-marqueesHeight;
    marquees.scrollTop+=1;
  }
}
&lt;/script&gt; [/CODE]

2005-04-04 16:50
bingxue2332
Rank: 3Rank: 3
等 级:新手上路
威 望:6
帖 子:446
专家分:0
注 册:2004-11-6
收藏
得分:0 
呵呵

刚好有个现成的

估计比你做的简单点  

2005-04-04 16:51
wobushishe
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2005-4-3
收藏
得分:0 
我是想在我的那个上面改,你的那个是不间断滚动,我的是翻动字幕,能再看看么?谢谢了。
2005-04-04 17:01
griefforyou
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:3336
专家分:0
注 册:2004-4-15
收藏
得分:0 
谁帮忙把这个垂直滚动字幕加上鼠标移动到上面就停止的功能? <link rel="stylesheet" href="/inc/life.css" type="text/css"> <script language="JavaScript1.2"> /* Pausing updown message scroller- Last updated: 99/07/05 (Bugs fixed, ability to specify background image for scroller) ?Dynamic Drive (www.dynamicdrive.com) For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use, visit dynamicdrive.com */ //这里配置滚动字幕的属性 var scrollerwidth=540 var scrollerheight=20 var scrollerbgcolor='#f4f4f4' var stopflag=false; //set below to '' if you don't wish to use a background image var scrollerbackground='scrollerback.gif' //修改下面的文字及文字所指向的链接 var messages=new Array() messages[0]="<font face='Arial'>公告1</font>" messages[1]="<font face='Arial'><a href=# target=_blank>公告2</a></font>" messages[2]="<font face='Arial'><a href=# target=_blank>公告3</a></font>" ///////不要修改下面的内容/////////////////////// if (messages.length>1) i=2 else i=0 function move1(whichlayer){ tlayer=eval(whichlayer) if (tlayer.top>0&&tlayer.top<=5){ tlayer.top=0 setTimeout("move1(tlayer)",3000) setTimeout("move2(document.main.document.second)",3000) return } if (tlayer.top>=tlayer.document.height*-1){ tlayer.top-=5 setTimeout("move1(tlayer)",100) } else{ tlayer.top=scrollerheight tlayer.document.write(messages[i]) tlayer.document.close() if (i==messages.length-1) i=0 else i++ } } function move2(whichlayer){ tlayer2=eval(whichlayer) if (tlayer2.top>0&&tlayer2.top<=5){ tlayer2.top=0 setTimeout("move2(tlayer2)",3000) setTimeout("move1(document.main.document.first)",3000) return } if (tlayer2.top>=tlayer2.document.height*-1){ tlayer2.top-=5 setTimeout("move2(tlayer2)",100) } else{ tlayer2.top=scrollerheight tlayer2.document.write(messages[i]) tlayer2.document.close() if (i==messages.length-1) i=0 else i++ } } function move3(whichdiv){ tdiv=eval(whichdiv) if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){ tdiv.style.pixelTop=0 setTimeout("move3(tdiv)",1000) setTimeout("move4(second2)",1000) return } if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){ if(stopflag==false) tdiv.style.pixelTop-=5 setTimeout("move3(tdiv)",100) } else{ tdiv.style.pixelTop=scrollerheight tdiv.innerHTML=messages[i] if (i==messages.length-1) i=0 else i++ } } function move4(whichdiv){ tdiv2=eval(whichdiv) if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){ tdiv2.style.pixelTop=0 setTimeout("move4(tdiv2)",1000) setTimeout("move3(first2)",1000) return } if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){ if(stopflag==false) tdiv2.style.pixelTop-=5 setTimeout("move4(second2)",100) } else{ tdiv2.style.pixelTop=scrollerheight tdiv2.innerHTML=messages[i] if (i==messages.length-1) i=0 else i++ } } function startscroll(){ if (document.all){ move3(first2) second2.style.top=scrollerheight second2.style.visibility='visible' } else if (document.layers){ document.main.visibility='show' move1(document.main.document.first) document.main.document.second.top=scrollerheight+5 document.main.document.second.visibility='show' } } window.onload=startscroll </script> <style type="text/css"> <!-- body { margin-left: 20px; margin-top: 6px; background-color: #f4f4f4; } --> </style><ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight}; bgColor=&{scrollerbgcolor}; background=&{scrollerbackground}; visibility=hide> <layer id="first" left=0 top=1 width=&{scrollerwidth};> <script language="JavaScript1.2"> if (document.layers) document.write(messages[0]) </script> </layer><layer id="second" left=0 top=0 width=&{scrollerwidth}; visibility=hide> <script language="JavaScript1.2"> if (document.layers) document.write(messages[1]) </script> </layer></ilayer><script language="JavaScript1.2"> if (document.all){ document.writeln('<span id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hiden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">') document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:0">') document.writeln('<div id="first2" onMouseOver="stopflag=true" onMouseOut="stopflag=false" style="position:absolute;width:'+scrollerwidth+';left:0;top:1;">') document.write(messages[0]) document.writeln('</div>') document.writeln('<div id="second2" onMouseOver="stopflag=true" onMouseOut="stopflag=false" style="position:absolute;width:'+scrollerwidth+';left:0;top:0;visibility:hidden">') document.write(messages[1]) document.writeln('</div>') document.writeln('</div>') document.writeln('</span>') } </script>
应该没问题了。

[此贴子已经被作者于2005-4-4 22:09:42编辑过]


天津网站建设 http://www./
2005-04-04 18:16
wobushishe
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2005-4-3
收藏
得分:0 
嘻嘻,多谢多谢楼上大哥。
但还是有点问题,能再改好一点吗?
2005-04-04 20:24
wobushishe
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2005-4-3
收藏
得分:0 
这个有高手能不能改成公告内容同样在这个文件里? [CODE] /* 插件名称: 论坛公告调用垂直滚动 for Dv7.1 更新日期: 2005-03-26 插件作者: stardy(斯大里) http://www.stardy.com 调用方法: <script language=javascript src="std_news.js"></script> */ //****************************参数设置****************************** var scrollperTime=20; //滚动快慢(越小滚动越快) var scrollstayTime=3000; //停留时间(ms毫秒) var lineNum=10; //显示行数,填0显示所有 var scrollNum=1; //滚动行数,填数字 var scrollHeight=19; //每行高度(象素px) var delayTime=0; //延时?ms显示(根据空间快慢取500-3000之间的数值) var thefontColor="" //链接字体颜色(可空) //**************************************************************** //代码开始 thefontColor=document.location.href.toLowerCase().indexOf("boardid=")<0?thefontColor:""; var scrollrealHeight=scrollHeight*scrollNum; var thedivName="bbsnewsDiv"; document.write("<div id="+thedivName+" align=center></div>"); var marqueeTable = eval("document.all."+thedivName); with(marqueeTable){style.height=scrollrealHeight;} var theboardID=getParameter("boardid") //取得版面ID var startmarqueeTop=0; var offsetTop=scrollrealHeight; var marqueestopTime=0; var stopScroll1=false,xml_news; function loadNews(){ xml_news = new ActiveXObject("Microsoft.XMLDOM"); xml_news.async=true; xml_news.onreadystatechange = newsGetReady; xml_news.load("std_news.asp?num="+lineNum+"&boardid="+theboardID); } function newsGetReady(){ if(xml_news.readyState!=4)return; if(xml_news.parseError.errorCode!=0){delete(xml_news);marqueeTable.innerHTML="对不起,XML公告加载出错!可能std_news.asp文件丢失或无效!";return;} maxNum = xml_news.getElementsByTagName("news").length; //检索的记录数 var htmlbegin='<table cellpadding=0 cellspacing=0 align=center>' var htmlend='</table>' var BodyText=""; for (var n=0;n<maxNum;n++){ BodyText=BodyText+"<TR>"; var tt=xml_news.getElementsByTagName("newstitle").item(n).text; var uu=xml_news.getElementsByTagName("url").item(n).text; var ee=xml_news.getElementsByTagName("writter").item(n).text; var tim=xml_news.getElementsByTagName("time").item(n).text; BodyText=BodyText+"<TD"+(thefontColor==""?" style='font-weight:800;'":" style='font-weight:800;color:"+thefontColor+"'")+" align=center height="+scrollrealHeight+"><span style='font-family:Webdings;font-size:15px'>X</span> "+(uu==""?tt:"<a"+(thefontColor==""?"":" style='color:"+thefontColor+"'")+" href=javascript:openScript('"+uu+"',500,400)"+(ee==""?"":" title='发布人:"+ee+"'")+">"+tt+"</a> ")+(tim==""?"":"("+tim+")")+"</TD>"; BodyText=BodyText+"</TR>" if(maxNum>scrollNum&&n==maxNum-1){n=-1;maxNum=scrollNum} } marqueeTable.innerHTML=htmlbegin+BodyText+htmlend; with(marqueeTable){ style.overflowY="hidden"; onmouseover=new Function("stopScroll1=true"); onmouseout=new Function("stopScroll1=false"); } delete(xml_news); marqueeTable.scrollTop=0; setmarqueeTime(); } function setmarqueeTime(){ marqueeTable.scrollTop=0; setInterval("marqueeUp()",scrollperTime); } function marqueeUp(){ if(stopScroll1==true)return; offsetTop+=1; if(offsetTop==scrollrealHeight+1){ marqueestopTime+=1; offsetTop-=1; if(marqueestopTime*scrollperTime>=scrollstayTime){ offsetTop=0; marqueestopTime=0; } } else{ startmarqueeTop=marqueeTable.scrollTop; marqueeTable.scrollTop+=1; if(startmarqueeTop==marqueeTable.scrollTop){ marqueeTable.scrollTop=0; marqueeTable.scrollTop+=1; } } } function getParameter(name){ var paramStr=document.location.search; name=name.toLowerCase() if(paramStr.length==0)return ""; if(paramStr.charAt(0)!='?')return ""; paramStr=unescape(paramStr); paramStr=paramStr.substring(1); if(paramStr.length==0)return ""; var params=paramStr.split('&'); for(var i=0;i<params.length;i++){ var parts=params[i].split('=',2); if(parts[0].toLowerCase()==name){ if(parts.length<2||typeof(parts[1])=="undefined"||parts[1]=="undefined"||parts[1]=="null")return ""; return parts[1]; } } return ""; } setTimeout("loadNews()",delayTime); [/CODE]
2005-04-04 20:50
快速回复:谁答出送7位号码qq
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.085047 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved