资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
javascript实现的鼠标链接提示效果生成器代码
<html> <head> <title>链接注释</title> <meta http-equiv="目录类型" content="文本/html; 字符集=gb2312"> <style type="text/css"> <!-- a{font-style:normal;text-decoration:none;color:white} a:hover {BACKGROUND:red;font-style:normal;text-decoration:none;color:yellow} a:active {font-style:normal;text-decoration:none;color:yellow;} .white { color: #FFFFFF} table { font-size: 9pt} --> </style> <link rel="stylesheet" href="style.css"> </head> <body bgcolor="#009900" topmargin="0" leftmargin="0"> <form name="form"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="#009900"> <td colspan="3" height="18"> </td> </tr> <tr> <td bgcolor="#009900" width="18"></td> <td align="center" bgcolor="#FFFFFF"> <table width="56%" border="0" cellspacing="0" cellpadding="0" height="355"> <tr> <td rowspan="2" width="16" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="white" style="FONT-SIZE: 11pt;"> <tr bgcolor="#336699" bordercolor="#336699"> <td style="BORDER-RIGHT: double; BORDER-TOP: double; BORDER-LEFT: double; BORDER-BOTTOM: double;" height="70"><strong><a href="06.htm" _ewebeditor_ta_href="06.htm">演 示</a></strong></td> </tr> <tr bordercolor="#009900" bgcolor="#009900"> <td style="BORDER-RIGHT: double; BORDER-TOP: double; BORDER-LEFT: double; BORDER-BOTTOM: double" height="70"><strong><a href="06c.htm" _ewebeditor_ta_href="06c.htm">源 代 码</a></strong></td> </tr> </table> </td> <td rowspan="2" width="8" bgcolor="#009900"> </td> <td align="center" style="BORDER-RIGHT: double; BORDER-TOP: double; FONT-SIZE: 12pt; BORDER-LEFT: double; BORDER-BOTTOM: double" bordercolor="#009900" valign="top"> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20language%3D%22JavaScript%22%3E%20%0D%0A%3C!--hide%20%0D%0A%0D%0Afunction%20view(form)%7B%20%0D%0Amsg%3Dopen(%22%22%2C%22DisplayWindow%22%2C%22status%3D1%2Cleft%3D0%2Ctop%3D0%2Cheight%3D350%2Cwidth%3D790%2C%22)%3Bmsg.document.write(form.code2.value)%3B%20%0D%0A%7D%20%0D%0Afunction%20CodeOut(form)%7B%20%0D%0Avar%20%20%20%20%20%20%0D%0Atxt1%3D%22%3Chtml%3E%3Ctitle%3E%E6%95%88%E6%9E%9C%E6%BC%94%E7%A4%BA%3C%2Ftitle%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%20onblur%3Dwindow.close()%20%20onmouseover%3Djavascript%3Aclose()%3E%22%2Bform.body.value%2B%22%22%3B%20%0D%0Atxt%3D%22%22%2Bform.a.value%2B%22%22%2Bform.b.value%2B%22%22%2Bform.c.value%2B%22%22%3B%20%0D%0Atxt%2B%3D%22%22%2Bform.d.value%2B%22%22%2Bform.e.value%2B%22%22%2Bform.f.value%2B%22%22%3B%20%0D%0Atxt%2B%3D%22%22%2Bform.g.value%2B%22%22%3B%20%0D%0Atxt2%3D%22%3C%2Fbody%3E%3C%2Fhtml%3E%22%3B%20%0D%0A%20%20%20%20%20%0D%0Aform.Code.value%3Dtxt%3B%20%0D%0Aform.code2.value%3Dtxt1%20%2B%20txt%20%2B%20txt2%3B%20%0D%0A%7D%20%0D%0A%0D%0A%3C!--%3E%20%0D%0A%3C%2Fscript%3E"> <input type="hidden" name="code2"> <div id="Layer1" style="position:absolute; width:207px; height:173px; z-index:1; visibility: hidden"> <textarea name="a" cols="40" rows="0" wrap="VIRTUAL"><a href="http://</textarea> <textarea name="c" cols="40" rows="0" wrap="VIRTUAL">" onMouseOver="showtip2(this,event,'</textarea> <textarea name="e" cols="40" rows="0" wrap="VIRTUAL">')" onMouseOut="hidetip2()"></textarea> <textarea name="g" cols="40" rows="0" wrap="VIRTUAL"></a></textarea> </div> <b>链接注释</b> <hr width="92%" size="1" align="center"> <table cellspacing="0" cellpadding="0" width="81%"> <tr> <td height="18" colspan="2">注释:放在<body>与</body>之间</td> </tr> <tr> <td colspan="2"> <textarea name="body" onFocus="this.select()" onMouseOver="this.focus()" cols="50" rows="3" wrap="VIRTUAL" style="BACKGROUND-COLOR: #009900;" class="pt9"><script> if (!document.layers&&!document.all) event="test" function showtip2(current,e,text){ if (document.all&&document.readyState=="complete"){ document.all.tooltip2.innerHTML='<marquee style="border:1px solid black">'+text+'</marquee>' document.all.tooltip2.style.pixelLeft=event.clientX+document.body.scrollLeft+10 document.all.tooltip2.style.pixelTop=event.clientY+document.body.scrollTop+10 document.all.tooltip2.style.visibility="visible" } else if (document.layers){ document.tooltip2.document.nstip.document.write('<b>'+text+'</b>') document.tooltip2.document.nstip.document.close() document.tooltip2.document.nstip.left=0 currentscroll=setInterval("scrolltip()",100) document.tooltip2.left=e.pageX+10 document.tooltip2.top=e.pageY+10 document.tooltip2.visibility="show" } } function hidetip2(){ if (document.all) document.all.tooltip2.style.visibility="hidden" else if (document.layers){ clearInterval(currentscroll) document.tooltip2.visibility="hidden" } } function scrolltip(){ if (document.tooltip2.document.nstip.left>=-document.tooltip2.document.nstip.document.width) document.tooltip2.document.nstip.left-=5 else document.tooltip2.document.nstip.left=150 } </script> <div id="tooltip2" style="position:absolute;clip:rect(0 150 50 0);width:150px;background-color:#99FF99; top: 31px; left: 103px; visibility: hidden; height: 13px"> </div></textarea> </td> </tr> <tr> <td colspan="2" height="30">链接标题: <input type=text name="f" onFocus="this.select()" onMouseOver="this.focus()" class="pt9" size="39"> </td> </tr> <tr> <td colspan="2" height="30">地址http:// <input type=text name="b" onFocus="this.select()" onMouseOver="this.focus()" #009900;" class="pt9" size="38"> </td> </tr> <tr> <td colspan="2" height="30">注释内容: <input type=text name="d" onFocus="this.select()" onMouseOver="this.focus()" class="pt9" size="39"> </td> </tr> <tr> <td colspan="2" align="center"> <p> <input type="button" value="产生代码" onClick="CodeOut(this.form);" name="button"> <input type="button" value="效果演示" onClick="view(this.form);" name="button2"> </td> </tr> <tr> <td colspan="2" height="22">注释:把下面生成链接放在你的位置</td> </tr> <tr> <td colspan="2"> <textarea name="Code" onFocus="this.select()" onMouseOver="this.focus()" cols="50" style="BACKGROUND-COLOR: #009900;" wrap="VIRTUAL" rows="4" class="pt9"></textarea> </td> </tr> </table> </td> </tr> <tr> <td height="20" class="white" bgcolor="#009900"> </td> </tr> </table> </td> <td bgcolor="#009900" width="18"></td> </tr> <tr bgcolor="#009900"> <td></td> <td align="center" height="35"> </td> <td> </td> </tr> </table> </form> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程