标签:
<script language="JavaScript"> function toggleVisibility(me){ if (me.style.visibility=="hidden"){ me.style.visibility="visible"; } else { me.style.visibility="hidden"; } } </script> <div onclick="toggleVisibility(this)" style="position:relative">
<script language="JavaScript"> function toggleDisplay(me){ if (me.style.display=="block"){ me.style.display="inline"; alert("文本现在是:‘inline‘."); } else { if (me.style.display=="inline"){ me.style.display="none"; alert("文本现在是:‘none‘. 3秒钟后自动重新显示。"); window.setTimeout("blueText.style.display=‘block‘;",3000,"JavaScript"); } else { me.style.display="block"; alert("文本现在是:‘block‘."); } } } </script> <div>在<span id="blueText" onclick="toggleDisplay(this)" style="color:blue;position:relative;cursor:hand;">蓝色</span>文字上点击来查看效果.</div>
标签:
原文地址:http://www.cnblogs.com/lvtian/p/5605050.html