文章搜索: 分类 关键字

   您的位置:首页网络编程Jsp专区 → 怎样编写IE和NN6通用的闪烁(blank)效果?
怎样编写IE和NN6通用的闪烁(blank)效果?
日期:2006-8-5 16:07:53 人气:     [ ]
根据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

出处:CnCode转载收集 作者:不详
<---->
 
| 关于本站 | 帮助(?) | 广告服务 | 版权声明 | 业务合作 | 发展历程 | 加盟我们 | 联系我们 | 中国源码中心 ≮为您提供建站帮助≯

  中国源码中心 版权所有 Copyright© 2002-2006 Www.CnCode.Com, All Rights Reserved. Powered By 中国源码中心