当前位置: 首页 > 图文教程 > 网络编程 > Javascript > 怎样编写IE和NN6通用的闪烁(blank)效果

Javascript
Add a Table to a Word Document
Add Formatted Text to a Word Document
用jscript实现新建word文档
用jscript实现新建和保存一个word文档
Open and Print a Word Document
Use Word to Search for Files
Convert Seconds To Hours
Sample script that deletes a SQL Server database
Sample script that displays all of the users in a given SQL Server DB
firefox中用javascript实现鼠标位置的定位
div+css实现鼠标放上去,背景跟图片都会变化。
Locate a File Using a File Open Dialog Box
Save a File Using a File Save Dialog Box
用jscript实现列出安装的软件列表
List the Stored Procedures in a SQL Server database
Display SQL Server Login Mode
Display SQL Server Version Information
List all the Databases on a SQL Server
用jscript启动sqlserver
Stop SQL Server

Javascript 中的 怎样编写IE和NN6通用的闪烁(blank)效果


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-08-10   浏览: 547 ::
收藏到网摘: n/a

根据Nascape 6的开发者称:在以后的版本里,将废除<blank></blank>标记。那么,下面的代码可以实现此功能!

<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="author" content="孟宪会">
<SCRIPT>
function blink (elId) {
 var html = '';
 if (document.all)
  html += 'var el = document.all.' + elId + ';';
 else if (document.getElementById)
  html += 'var el = document.getElementById("' + elId + '");';
 html +=
  'el.style.visibility = ' +
  'el.style.visibility == "hidden" ? "visible" : "hidden"';
 if (document.all || document.getElementById)
  setInterval(html, 500)
}
function init () {
 blink('aText');
 blink('a2ndText');
}
</SCRIPT>
</HEAD>
<BODY ONLOAD="init();">
<SPAN ID="aText">
<BLINK>
这行文字闪烁!!!
</BLINK>
</SPAN>
<BR>
这行文字闪烁!!!
<DIV ID="a2ndText">
这行文字闪烁!!!
</DIV>
</BODY>
</HTML>
查看更多内容,请访问,可以看到变色的闪烁!

http://elove.heha.net 

http://lucky.myrice.com
(原作者:net_lover)