这里有新鲜出炉的 Javascript 教程,程序狗速度看过来!
Javascript 是一种由 Netscape 的 LiveScript 发展而来的原型化继承的基于对象的动态类型的区分大小写的客户端脚本语言,主要目的是为了解决服务器端语言,比如 Perl,遗留的速度问题,为客户提供更流畅的浏览效果。
使用 JavaScript 实现的类似光照效果的文字,由渐变光照过去,文字从左到右渐变,看过之后目瞪口呆很有视觉冲击效果, 感兴趣的朋友可以研究下
- <!-- no prod -->
- <!doctype html public "-//W3C//DTD HTML 3.2//EN">
- <html><head><title>炫彩的文字效果</title>
- <meta name="ROBOTS" content="NOINDEX">
- <script language="VBScript"> <!--
- 'Declare the variable used to increment the x coordinate
- Public XPos
- 'Initialize the variable
- XPos = 20
- Function LightMe()
- 'Puts a spotlight on the title
- call document.all.title.filters(0).addPoint(20, 10, 100, 200, 225, 200, 100)
- MoveLight
- End Function
- Function MoveLight()
- 'Moves the spotlight from left to right across the title area until it reaches the edge
- 'of the window and then stops
- 'This increments the x coordinate
- XPos = XPos + 5
- 'If not at the right edge of the window then move the spotlight right
- If XPos < 480 Then
- call document.all.title.filters(0).movelight(0, xpos, 10, 100, 1)
- myTimer = window.setTimeout("Movelight", 1)
- 'If at the right edge of the window call the first paragraph of text
- Else
- window.clearTimeout(myTimer)
- call document.all.title.filters(0).clear
- Text1Trans
- End If
- End Function
- Sub Text1Trans()
- 'Makes the first paragraph of text visible
- Text1.filters(0).Apply()
- Text1.style.visibility="visible"
- Text1.filters(0).Play()
- myTimer = window.setTimeout("Text2Trans", 3000)
- End Sub
- Sub Text2Trans()
- 'Makes the second paragraph of text visible
- Text2.filters(0).Apply()
- Text2.style.visibility="visible"
- Text2.filters(0).Play()
- Link2Trans
- End Sub
- Sub Link2Trans()
- 'Makes the Next button visible
- Link2.filters(0).apply()
- Link2.style.visibility="visible"
- Link2.filters(0).play()
- End Sub
- Sub Next_onclick()
- 'Makes the button appeared depressed and moves to next slide
- document.all.ButtonNext.src = "http://www.jb51.net/images/logo.gif"
- location.href= "http://www.jb51.net"
- End Sub
- -->
- </script>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <style>
- body,div,td{font:menu}
- </style>
- </head>
- <body onload="LightMe" bgcolor="#800000" text="#D4B878" >
- <div><strong>欢迎使用 Internet 信息服务!</strong></div>
- <div><strong>Microsoft Internet 信息服务是一个桌面 web 服务器,使用它,您可以从自己的计算机上发布个人主页,并把您计算机上的文档共享到整个网络。
- </strong></div>
- <div><strong>在将站点上载到 Internet 提供商之前,也可以将 IIS 用作开发平台。</strong></div>
- <div ><img class="img-responsive" src="right1up.gif" border=0 onmouseover="ButtonNext.src = 'http://www.jb51.net/images/logo.gif' " onmouseout="ButtonNext.src = 'right1up.gif' " onclick=next_onclick data-src=""></div>
- <div><img class="img-responsive" src=right3down.gif data-src=""></div>
- </font>
- </body>
- </html>
(adsbygoogle = window.adsbygoogle || []).push({});
来源: http://www.phperz.com/article/17/0704/281240.html