实现简单提示条的两种方法:

发表于:2007-06-30来源:作者:点击数: 标签:
SCRIPT !-- function runCode(ID){//定义运行代码的函数, var code=event.srcElement.parentElement.children[ID].value;//即要运行的代码。 var newwin=window.open(@#@#,@#@#,@#@#);//打开一个窗口并赋给变量newwin。 newwin.opener = null newwin.documen
<SCRIPT>
<!--

function runCode(ID){  //定义运行代码的函数,
  var code=event.srcElement.parentElement.children[ID].value;//即要运行的代码。
  var newwin=window.open(@#@#,@#@#,@#@#);  //打开一个窗口并赋给变量newwin。
  newwin.opener = null
  newwin.document.write(code);  
  newwin.document.close();

}
//-->
</script>

<textarea  cols=95 rows=12>
<STYLE type="text/css">
<!--
td,body{font:14px}
.article {
BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; FILTER: revealTrans(transition=23,duration=0.5) blendTrans(duration=0.5); POSITION: absolute; VISIBILITY: hidden
; background-color: #FFCC00; padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px}
-->
</STYLE><SCRIPT>
<!--
function Show(divid) {
divid.filters.revealTrans.apply();
divid.style.visibility = "visible";
divid.filters.revealTrans.play();
}
function Hide(divid) {
divid.filters.revealTrans.apply();
divid.style.visibility = "hidden";
divid.filters.revealTrans.play();
}
</script>
<table width="140" border="0" cellspacing="1" cellpadding="1">
          <tr>
            <td height="20" bgcolor="eeeeee">  <a href="javascript:void(0);"  onMouseOver=Show(a) onMouseOut=Hide(a)>这个提示用的是层</a><div id="a" class="article"><a href="">这个提示用的是层</a></div></td>
          </tr>

        </table>

</textarea><input type=button value=运行用层显示的代码 onclick=@#runCode(0)@#>
<textarea  cols=95 rows=12>
<OBJECT  id=menu   type="application/x-oleobject"   classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"></OBJECT>
<script>function show(str){menu.TextPopup(str,"Verdana,9,,bold",10,5,10,10)}</script>
<a onmouseover=@#show("提示不一定要用层")@# href="javascript:void(0);">提示不一定要用层</a>
</textarea><input type=button value=运行不用层显示的代码 onclick=@#runCode(2)@#>

原文转自:http://www.ltesting.net