建站学 - 轻松建站从此开始!

建站学-个人建站指南,网页制作,网站设计,网站制作教程

鼠标悬停到页面文字上可以显示图片

时间:2011-01-31 15:54来源: 作者: 点击:
鼠标悬停到页面文字上可以显示图片,效果如图,本例是以图片为例,使用的时候请修改引用!   JS教程:鼠标悬停文字上</div> <div class="content"> <table width='100%'> <tr> <td><div id="contentMidPicAD" style="float:right; clear:both; top:0; vertical-align:top;"><!-- 250x250启用SSP 开始 --><script type="text/javascript">var _mda_place_id ="58bcc82381892";</script><script type="text/javascript" src="http://place.ssp.desdev.cn/pageplace/show.js"></script><!-- 250x250启用SSP 结束 --></div> (责任编辑:admin)</td> </tr> </table> </div> <!-- /content --> <div class="dede_pages"> <ul class="pagelist"> </ul> </div> <center> <a href='http://2v.dedecms.com/' id='__dedeqrcode_3'>织梦二维码生成器</a> <script type="text/javascript"> var __dedeqrcode_id=3; var __dedeqrcode_aid=5957; var __dedeqrcode_type='arc'; var __dedeqrcode_dir='/System/plus'; </script> <script language="javascript" type="text/javascript" src="/System/plus/img/qrcode.js"></script></center> <!-- /pages --> <!-- //顶踩 --> <div class="newdigg" id="newdigg"> <div class="diggbox digg_good" onmousemove="this.style.backgroundPosition='left bottom';" onmouseout="this.style.backgroundPosition='left top';" onclick="javascript:postDigg('good',5957)"> <div class="digg_act">顶一下</div> <div class="digg_num">(1)</div> <div class="digg_percent"> <div class="digg_percent_bar"><span style="width:100%"></span></div> <div class="digg_percent_num">100%</div> </div> </div> <div class="diggbox digg_bad" onmousemove="this.style.backgroundPosition='right bottom';" onmouseout="this.style.backgroundPosition='right top';" onclick="javascript:postDigg('bad',5957)"> <div class="digg_act">踩一下</div> <div class="digg_num">(0)</div> <div class="digg_percent"> <div class="digg_percent_bar"><span style="width:0%"></span></div> <div class="digg_percent_num">0%</div> </div> </div> </div> <script language="javascript" type="text/javascript">getDigg(5957);</script> <!-- //顶踩部份的源码结束 --> <!-- //分享代码开始 --> <!-- //分享代码结束 --> <div class="boxoff"> <strong>------分隔线----------------------------</strong> </div> <div class="handle"> <div class="context"> <ul> <li>上一篇:<a href='/wangzhankaifa/javascript-ajax/201101/31-5956.html'>如何让网页指定的关键字变色</a> </li> <li>下一篇:<a href='/wangzhankaifa/javascript-ajax/201102/05-5993.html'>上传图片使用ajax异步数据</a> </li> </ul> </div> <!-- /context --> <div class="actbox"> <ul> <li id="act-fav"><a href="/System/plus/stow.php?aid=5957" target="_blank">收藏</a></li> <li id="act-err"><a href="/System/plus/erraddsave.php?aid=5957&title=鼠标悬停到页面文字上可以显示图片" target="_blank">挑错</a></li> <li id="act-pus"><a href="/System/plus/recommend.php?aid=5957" target="_blank">推荐</a></li> <li id="act-pnt"><a href="#" onClick="window.print();">打印</a></li> </ul> </div> <!-- /actbox --> </div> <!-- /handle --> </div> <!-- /viewbox --> <!-- //AJAX评论区 --> <!-- //主模板必须要引入/System/include/dedeajax2.js --> <a name='postform'></a> <div class="mt1"> <dl class="tbox"> <dt> <strong>发表评论</strong> <span class="more"></span> </dt> <dd> <div class="dede_comment_post"> <form action="#" method="post" name="feedback"> <input type="hidden" name="dopost" value="send" /> <input type="hidden" name="comtype" value="comments"> <input type="hidden" name="aid" value="5957" /> <input type="hidden" name="fid" id='feedbackfid' value="0" /> <div class="dcmp-title"> <small>请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。</small> </div><!-- /dcmp-title --> <div class="dcmp-stand"> <strong>评价:</strong> <input type="radio" name="feedbacktype" checked="1" value="feedback" id="dcmp-stand-neu" /><label for="dcmp-stand-neu"><img src="/System/templets/default/images/cmt-neu.gif" />中立</label> <input type="radio" name="feedbacktype" value="good" id="dcmp-stand-good" /><label for="dcmp-stand-good"><img src="/System/templets/default/images/cmt-good.gif" />好评</label> <input type="radio" name="feedbacktype" value="bad" id="dcmp-stand-bad" /><label for="dcmp-stand-bad"><img src="/System/templets/default/images/cmt-bad.gif" />差评</label> </div><!-- /dcmp-stand --> <div class="clr"></div> <div class="dcmp-mood"> <strong>表情:</strong> <ul> </ul> </div><!-- /dcmp-mood --> <div class="dcmp-content"> <textarea cols="60" name="msg" rows="5" class="ipt-txt"></textarea> </div><!-- /dcmp-content --> <div class="dcmp-post"><!--未登陆--> <div class="dcmp-userinfo" id="_ajax_feedback"> 用户名:<input type="text" name="username" size="16" class="ipt-txt" style="text-transform: uppercase;"/> 验证码:<input type="text" name="validate" size="4" class="ipt-txt" style="text-transform:uppercase;"/><img src= "/System/include/vdimgck.php" id="validateimg" style="cursor:pointer" onclick="this.src=this.src+\'?\'" title="点击我更换图片" alt="点击我更换图片" /> <input type="checkbox" name="notuser" id="dcmp-submit-guest" /><label for="dcmp-submit-guest" />匿名? </label> </div> <div class="dcmp-submit"> <button type="button" onClick='PostComment()'>发表评论</button> </div> </div> </form> </div> </dd> </dl> </div><!-- //评论表单区结束 --> <!-- //评论内容区 --> <a name='commettop'></a> <div class="mt1"> <dl class="tbox"> <dt> <strong>最新评论</strong> <span class="more"><a href="/System/plus/feedback.php?aid=5957">进入详细评论页>></a></span> </dt> <!-- //这两个ID的区块必须存在,否则JS会出错 --> <dd id='commetcontentNew'></dd> <dd id='commetcontent'></dd> </dl> </div> <!-- //由于评论载入时使用异步传输,因此必须在最后一步加载(DIGG和评论框须放在评论内容前面) //如果一定需要提前的把myajax.SendGet改为myajax.SendGet2,但可能会引起页面阻滞 --> <script language='javascript'> function LoadCommets(page) { var taget_obj = document.getElementById('commetcontent'); var waithtml = "<div style='line-height:50px'><img src='/System/images/loadinglit.gif' />评论加载中...</div>"; var myajax = new DedeAjax(taget_obj, true, true, '', 'x', waithtml); myajax.SendGet2("/System/plus/feedback_ajax.php?dopost=getlist&aid=5957&page="+page); DedeXHTTP = null; } function PostComment() { var f = document.feedback; var nface = '6'; var nfeedbacktype = 'feedback'; var nvalidate = ''; var nnotuser = ''; var nusername = ''; var npwd = ''; var taget_obj = $DE('commetcontentNew'); var waithtml = "<div style='line-height:30px'><img src='/System/images/loadinglit.gif' />正在发送中...</div>"; if(f.msg.value=='') { alert("评论内容不能为空!"); return; } if(f.validate) { if(f.validate.value=='') { alert("请填写验证码!"); return; } else { nvalidate = f.validate.value; } } if(f.msg.value.length > 500) { alert("你的评论是不是太长了?请填写500字以内的评论。"); return; } if(f.feedbacktype) { for(var i=0; i < f.feedbacktype.length; i++) if(f.feedbacktype[i].checked) nfeedbacktype = f.feedbacktype[i].value; } if(f.face) { for(var j=0; j < f.face.length; j++) if(f.face[j].checked) nface = f.face[j].value; } if(f.notuser.checked) nnotuser = '1'; if(f.username) nusername = f.username.value; if(f.pwd) npwd = f.pwd.value; var myajax = new DedeAjax(taget_obj, false, true, '', '', waithtml); myajax.sendlang = 'gb2312'; myajax.AddKeyN('dopost', 'send'); myajax.AddKeyN('aid', '5957'); myajax.AddKeyN('fid', f.fid.value); myajax.AddKeyN('face', nface); myajax.AddKeyN('feedbacktype', nfeedbacktype); myajax.AddKeyN('validate', nvalidate); myajax.AddKeyN('notuser', nnotuser); myajax.AddKeyN('username', nusername); myajax.AddKeyN('pwd', npwd); myajax.AddKeyN('msg', f.msg.value); myajax.SendPost2('/System/plus/feedback_ajax.php'); f.msg.value = ''; f.fid.value = 0; if(f.validate) { if($DE('validateimg')) $DE('validateimg').src = "/System/include/vdimgck.php?"+f.validate.value; f.validate.value = ''; } } function quoteCommet(fid) { document.feedback.fid.value = fid; } LoadCommets(1); </script><!-- //评论内容区结束 --> </div> <!-- //左边内容结束 --> <!-- //右边内容开始 --> <div class="pright"> <div class="pright"> <div> <dl class="tbox"> <dt><strong>栏目列表</strong></dt> <dd> <ul class="d6"> <li><a href='/wangzhankaifa/asp/'>asp教程</a></li> <li><a href='/wangzhankaifa/php/'>PHP教程</a></li> <li><a href='/wangzhankaifa/jsp/'>JSP教程</a></li> <li><a href='/wangzhankaifa/asp-net/'>asp.net教程</a></li> <li><a href='/wangzhankaifa/javascript-ajax/' class='thisclass'>JavaScript/Ajax教程</a></li> <li><a href='/wangzhankaifa/xml-xslt/'>xml/XSLT教程</a></li> <li><a href='/wangzhankaifa/shtml/'>Shtml教程</a></li> <li><a href='/wangzhankaifa/Pythonjiaocheng/'>Python教程</a></li> <li><a href='/wangzhankaifa/Javajiaocheng/'>Java教程</a></li> </ul> </dd> </dl> </div> <div id="contentRtPicAD" style="margin:10px auto"><!-- 250x250普通 开始 --><script type="text/javascript">var _mda_place_id ="58bcc92e8b472";</script><script type="text/javascript" src="http://place.ssp.desdev.cn/pageplace/show.js"></script><!-- 250x250普通 结束 --></div> <div class="commend mt1"> <dl class="tbox light"> <dt class='light'><strong>推荐内容</strong></dt> <dd class='light'> <ul class="d4"> </ul> </dd> </dl> </div> <!-- /commend --> <div class="hot mt1"> <dl class="tbox light"> <dt class='light'><strong>热点内容</strong></dt> <dd class='light'> <ul class="c1 ico2"> <li><a href="/wangzhankaifa/javascript-ajax/200905/13-2109.html">jQuery入门[1]-构造函数</a></li> <li><a href="/wangzhankaifa/javascript-ajax/200905/13-2108.html">jQuery入门[2]-选择器</a></li> <li><a href="/wangzhankaifa/javascript-ajax/200905/13-2102.html">Jquery一行代码轻松实现拖动效果</a></li> <li><a href="/wangzhankaifa/javascript-ajax/200905/13-2107.html">jQuery入门[3]-事件</a></li> <li><a href="/wangzhankaifa/javascript-ajax/200905/13-2105.html">jQuery入门[5]-AJAX</a></li> <li><a href="/wangzhankaifa/javascript-ajax/200905/13-2104.html">jQuery入门[6]-动画</a></li> <li><a href="/wangzhankaifa/javascript-ajax/200905/13-2106.html">jQuery入门[4]-链式代码</a></li> <li><a href="/wangzhankaifa/javascript-ajax/200912/25-3302.html"><strong>jquery 弹出登录窗口实现代码</strong></a></li> <li><a href="/wangzhankaifa/javascript-ajax/201008/12-4306.html">基于jQuery的无缝滚动应用(单行</a></li> <li><a href="/wangzhankaifa/javascript-ajax/200905/13-2096.html">240多个jQuery插件推荐</a></li> </ul> </dd> </dl> </div> <div id="contentRtPicAD2" style="margin:10px auto"><!-- 250x250启用SSP 开始 --><script type="text/javascript">var _mda_place_id ="58bcc82381892";</script><script type="text/javascript" src="http://place.ssp.desdev.cn/pageplace/show.js"></script><!-- 250x250启用SSP 结束 --></div> </div> <!-- /pright --> </div> <div id="innerfooterAD2" style="margin:10px auto; width:726px"><!-- 728x90普通 开始 --><script type="text/javascript">var _mda_place_id ="58bce8309bc21";</script><script type="text/javascript" src="http://place.ssp.desdev.cn/pageplace/show.js"></script><!-- 728x90普通 结束 --></div> <!-- //底部模板 --> <div class="footer w960 center mt1 clear"> <!-- 为了支持织梦团队的发展,请您保留织梦内容管理系统的链接信息. 我们对支持织梦团队发展的朋友表示真心的感谢!织梦因您更精彩! --> <div class="footer_left"></div> <div class="footer_body"> <p class="powered"> Powered by <a href="http://www.dedecms.com" title="织梦内容管理系统(DedeCms)--国内最专业的PHP网站管理系统,轻松建站的首选利器。" target="_blank"><strong>DedeCMS_V57_GBK_SP2</strong></a> © 2004-2017 <a href="http://www.desdev.cn/" target="_blank">DesDev</a> Inc.<br /><div class="copyright">Copyright © 2002-2017 建站学. 晨展科技 版权所有<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id=cnzz_stat_icon_1275247630%3E%3C/span%3E%3Cscript src=" + cnzz_protocol + "s23.cnzz.com/stat.php%3Fid%3D1275247630%26show%3Dpic1 type=text/javascript%3E%3C/script%3E"));</script> <script> (function(){ var bp = document.createElement(script); var curProtocol = window.location.protocol.split(:)[0]; if (curProtocol === https) { bp.src = https://zz.bdstatic.com/linksubmit/push.js; } else { bp.src = http://push.zhanzhang.baidu.com/push.js; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> <a href=http://www.dedecms.com target='_blank'>Power by DedeCms</a>  <a href="http://www.miibeian.gov.cn/" title="豫ICP备18028807号-1">豫ICP备18028807号-1</a></div></p> <!-- /powered --> </div> <div class="footer_right"></div> </div> <!-- /footer --> <script type="text/javascript"> var contentRtPicAD2 = document.getElementById("contentRtPicAD2"); var stop = contentRtPicAD2.offsetTop - 60, docBody = document.documentElement || document.body.parentNode || document.body, hasOffset = window.pageYOffset !== undefined, scrollTop; window.onscroll = function (e) { // cross-browser compatible scrollTop. scrollTop = hasOffset ? window.pageYOffset : docBody.scrollTop; if (scrollTop >= stop) { contentRtPicAD2.className = 'stick'; } else { contentRtPicAD2.className = ''; } } </script> </body> </html>