标题:
HTML 第十课:鼠标跟字和页底流动字代码
[打印本页]
作者:
画儿
时间:
2009-9-17 06:41
标题:
HTML 第十课:鼠标跟字和页底流动字代码
HTML 第十课:鼠标跟字和页底流动字代码
(将这些代码放在音画贴代码的后面,替换其中汉字部分就ok)
</html>
</table>
<!-- End ImageReady Slices -->
<SCRIPT language=JavaScript>
<!--
var mouse=new Object()
mouse.msg="※画儿音画※※感谢您的欣赏※"
mouse.x=0
mouse.y=0
mouse.speed=Math.PI/600 // 1 degree
mouse.radius=55
mouse.ms=new Array()
if(document.layers){
document.captureEvents(Event.MOUSEMOVE)
for(i=0;i<=mouse.msg.length;i++)document.write("<layer name='mousetext"+i+"'>"+mouse.msg.charAt(i)+"</layer>")
}else
for(i=0;i<=mouse.msg.length;i++)document.write("<span id='mousetext"+i+"' class='tacoscript'>"+mouse.msg.charAt(i)+"</span>")
for(i=0;i<=mouse.msg.length;i++){
mouse.ms=document.getElementById?document.getElementById("mousetext"+i).style:document.all?document.all["mousetext"+i].style:document.layers["mousetext"+i]
mouse.ms.deg=Math.PI*2/mouse.msg.length*i}
document.onmousemove=function m(e){
if(!e)e=event
mouse.x=document.all?document.body.scrollLeft+e.clientX:e.pageX
mouse.y=document.all?document.body.scrollTop+e.clientY:e.pageY
run()}
function run(){
for(i=mouse.ms.length-1;i>=0;i--){
mouse.ms.deg+=mouse.speed
mouse.ms.left=mouse.x-Math.sin(mouse.ms.deg)*mouse.radius
mouse.ms.top=mouse.y+Math.cos(mouse.ms.deg)*mouse.radius}}
setInterval(run,100)
//-->
</SCRIPT><style type="text/css">.tacoscript {
FONT-SIZE: 10pt; VISIBILITY: visible; POSITION: absolute
}</style><SCRIPT language=javascript>
function click()
{
if (event.button==2) {
alert('画儿qq75473686)
}
}
document.onmousedown=click
</SCRIPT>
<SCRIPT language=JavaScript> <!--
ScrollSpeed = 250; // milliseconds between scrolls
ScrollChars = 2; // chars scrolled per time period
function SetupTicker() {
msg = " 〖画儿音画〗::莲的心事 :: ";
RunTicker();}
function RunTicker() {
window.setTimeout('RunTicker()',ScrollSpeed);
window.status = msg;
msg = msg.substring(ScrollChars) + msg.substring(0,ScrollChars);}
SetupTicker();
<!-- end -->
</SCRIPT><SCRIPT language=JavaScript>
<!--
locate = 0;
function scroller()
{
if (locate !=500 )
{
locate++;
scroll(0,locate);
clearTimeout(timer);
var timer = setTimeout("scroller()",3);
timer;
}
}
// -->
</SCRIPT><!-- End ImageReady Slices --></embed>
</body>
</html>
欢迎光临 清净莲海六合敬修学网 祈愿:世界和平 正法久住 (http://jixiangyun.com/bbs/)
Powered by Discuz! 6.0.0