站内搜索: 请输入搜索关键词

当前页面: 开发资料首页Javascript 专题怎样编写IE和NN6通用的闪烁(blank)效果

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

摘要: 怎样编写IE和NN6通用的闪烁(blank)效果


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


<head>


<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();">


这行文字闪烁!!!




这行文字闪烁!!!


这行文字闪烁!!!

</body>

查看更多内容,请访问,可以看到变色的闪烁!

http://elove.heha.net

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

</td> </tr> <tr> <td vAlign=top align=left height="100%">
↑返回目录
前一篇: JavaScript和Java的区别
后一篇: COOKIE欺骗