站长资源网络编程

Jquery中国地图热点效果-鼠标经过弹出提示层信息的简单实例

整理:jimmy2026/8/6浏览2
简介如下所示:复制代码 代码如下: Jquery中国地图</div> <div class="news_infos"><div id="MyContent"><P>如下所示:<BR><U>复制代码</U> 代码如下:<BR><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><BR><html><BR><head><BR>    <title>Jquery中国地图热点效果-鼠标经过弹出提示层信息的简单实例</title><BR>    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><BR>    <script src="/UploadFiles/2021-04-02/jquery-1.8.0.min.js">    <style type="text/css"><BR>        .map img<BR>        {<BR>            width: 496px;<BR>            height: 415px;<BR>        }<BR>        .mapDiv<BR>        {<BR>            width: 140px;<BR>            height: 61px;<BR>            padding: 5px;<BR>            color: #369;<BR>            background: url('Images/dialge.gif') no-repeat;<BR>            position: absolute;<BR>            display: none;<BR>            word-break: break-all;<BR>        }<BR>    </style><BR>    <script type="text/javascript"><BR>        $(document).ready(function () {<BR>            $("area").each(function () {<BR>                var $x = -55;<BR>                var $y = -80;<BR>                var name = $(this).attr("alt");<BR>                $(this).mouseover(function (e) {<BR>                    var strall = [];<BR>                    strall = $(this).attr("coords").split(",");<BR>                    var x = parseInt(strall[0]);<BR>                    var y = parseInt(strall[3]);<BR>                    var index_num = $(this).index();<BR>                    var dom = "<div class='mapDiv'><p>提示消息<span class='name'></span><span class='num'></span></p></div>";<BR>                    $("body").append(dom);<BR>                    $(".name").text(name);<BR>                    $(".num").text(index_num)<BR>                    $(".mapDiv").css({<BR>                        left: (x + $x) + "px",<BR>                        top: (y + $y) + "px"</P> <P>                    }).show();<BR>                }).mouseout(function () {<BR>                    $(".mapDiv").remove();<BR>                }).mousemove(function (e) {<BR>                    $(".mapDiv").css({<BR>                        left: (x + $x) + "px",<BR>                        top: (y + $y) + "px"<BR>                    })<BR>                });<BR>            });<BR>            //first load<BR>            show();<BR>            //random<BR>            setInterval(show, 3000); // 注意函数名没有引号和括弧 <BR>        });</P> <P><BR>        function show() {<BR>            var area = $("area");<BR>            var random = getRandom(area.length);<BR>            $(area[random]).trigger("mouseover");<BR>        }</P> <P>        function getRandom(n) { return Math.floor(Math.random() * n + 1) }<BR>    </script><BR></head><BR><body><BR>    <div class="map"><BR>        <img border="0" usemap="#Map" src="/UploadFiles/2021-04-02/1544302yufceen0c3nbjzu.png">        <map name="Map" id="Map"><BR>            <area id="beijing" alt="北京" href="forum.php?gid=1" coords="354,140,380,153" shape="rect"><BR>            <area id="shanghai" alt="上海" href="forum.php?gid=3" coords="434,246,462,259" shape="rect"><BR>            <area id="tianjin" alt="天津" href="forum.php?gid=2" coords="382,168,408,180" shape="rect"><BR>            <area id="chongqing" alt="重庆" href="forum.php?gid=4" coords="294,264,320,276" shape="rect"><BR>            <area id="hebei" alt="河北" href="forum.php?gid=5" coords="347,174,374,186" shape="rect"><BR>            <area id="shanxi" alt="山西" href="forum.php?gid=6" coords="322,186,348,198" shape="rect"><BR>            <area id="neimenggu" alt="内蒙古" href="forum.php?gid=7" coords="349,110,388,124" shape="rect"><BR>            <area id="liaoning" alt="辽宁" href="forum.php?gid=8" coords="406,128,432,140" shape="rect"><BR>            <area id="jilin" alt="吉林" href="forum.php?gid=9" coords="427,101,454,115" shape="rect"><BR>            <area id="heilongjiang" alt="黑龙江" href="forum.php?gid=10" coords="424,58,464,73" shape="rect"><BR>            <area id="jiangsu" alt="江苏" href="forum.php?gid=11" coords="404,224,417,250" shape="rect"><BR>            <area id="zhejiang" alt="浙江" href="forum.php?gid=12" coords="413,265,427,291" shape="rect"><BR>            <area id="anhui" alt="安徽" href="forum.php?gid=13" coords="382,236,395,263" shape="rect"><BR>            <area id="fujian" alt="福建" href="forum.php?gid=14" coords="399,300,413,327" shape="rect"><BR>            <area id="jiangxi" alt="江西" href="forum.php?gid=15" coords="371,286,385,313" shape="rect"><BR>            <area id="shandong" alt="山东" href="forum.php?gid=16" coords="373,196,399,208" shape="rect"><BR>            <area id="henan" alt="河南" href="forum.php?gid=17" coords="337,228,364,239" shape="rect"><BR>            <area id="hubei" alt="湖北" href="forum.php?gid=18" coords="329,258,356,271" shape="rect"><BR>            <area id="hunan" alt="湖南" href="forum.php?gid=19" coords="325,294,352,306" shape="rect"><BR>            <area id="guangdong" alt="广东" href="forum.php?gid=20" coords="356,343,382,355" shape="rect"><BR>            <area id="guangxi" alt="广西" href="forum.php?gid=21" coords="302,343,328,355" shape="rect"><BR>            <area id="hainan" alt="海南" href="forum.php?gid=22" coords="313,398,340,411" shape="rect"><BR>            <area id="sichuan" alt="四川" href="forum.php?gid=23" coords="239,265,265,277" shape="rect"><BR>            <area id="guizhou" alt="贵州" href="forum.php?gid=24" coords="283,311,308,324" shape="rect"><BR>            <area id="yunnan" alt="云南" href="forum.php?gid=25" coords="225,337,251,349" shape="rect"><BR>            <area id="shaanxi" alt="陕西" href="forum.php?gid=26" coords="303,224,316,251" shape="rect"><BR>            <area id="gansu" alt="甘肃" href="forum.php?gid=27" coords="179,156,205,168" shape="rect"><BR>            <area id="qinghai" alt="青海" href="forum.php?gid=28" coords="174,206,200,218" shape="rect"><BR>            <area id="ningxia" alt="宁夏" href="forum.php?gid=29" coords="277,188,290,212" shape="rect"><BR>            <area id="xinjiang" alt="新疆" href="forum.php?gid=30" coords="85,140,111,152" shape="rect"><BR>            <area id="xizang" alt="西藏" href="forum.php?gid=31" coords="87,249,113,261" shape="rect"><BR>            <area id="xianggang" alt="香港" href="forum.php?gid=32" coords="379,358,406,370" shape="rect"><BR>            <area id="aomen" alt="澳门" href="forum.php?gid=33" coords="349,371,375,383" shape="rect"><BR>            <area id="taiwan" alt="台湾" href="forum.php?gid=34" coords="434,322,448,348" shape="rect"><BR>        </map><BR>    </div><BR></body><BR></html><BR></P></div> </div> </div> <div class="share"> </div> <div class="nextinfo"> <p>上一篇:<a href="/3g/1/119644.html" title="利用jquery.qrcode在页面上生成二维码且支持中文">利用jquery.qrcode在页面上生成二维码且支持中文</a></p> <p>下一篇:<a href="/3g/1/119646.html" title="JavaScript cookie的设置获取删除详解">JavaScript cookie的设置获取删除详解</a></p> </div> <div class="otherlink"> <h2>最新资源</h2> <ul> <li><a href="/3g/1/623703.html" title="群星《奔赴!万人现场 第2期》[FLAC/分轨]">群星《奔赴!万人现场 第2期》[FLAC/分轨]</a></li> <li><a href="/3g/1/623702.html" title="群星《奇妙浪一夏 (上海迪士尼度假区音乐">群星《奇妙浪一夏 (上海迪士尼度假区音乐</a></li> <li><a href="/3g/1/623701.html" title="群星《奇妙浪一夏 (上海迪士尼度假区音乐">群星《奇妙浪一夏 (上海迪士尼度假区音乐</a></li> <li><a href="/3g/1/623700.html" title="【古典音乐】詹姆斯·高威《季节》1993[WA">【古典音乐】詹姆斯·高威《季节》1993[WA</a></li> <li><a href="/3g/1/623699.html" title="贝拉芳蒂《卡里普索之王》SACD[WAV+CUE]">贝拉芳蒂《卡里普索之王》SACD[WAV+CUE]</a></li> <li><a href="/3g/1/623698.html" title="小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE">小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE</a></li> <li><a href="/3g/1/623697.html" title="群星《欢迎来到我身边 电影原声专辑》[32">群星《欢迎来到我身边 电影原声专辑》[32</a></li> <li><a href="/3g/1/623696.html" title="群星《欢迎来到我身边 电影原声专辑》[FL">群星《欢迎来到我身边 电影原声专辑》[FL</a></li> <li><a href="/3g/1/623695.html" title="雷婷《梦里蓝天HQⅡ》 2023头版限量编号低">雷婷《梦里蓝天HQⅡ》 2023头版限量编号低</a></li> <li><a href="/3g/1/623694.html" title="群星《2024好听新歌42》AI调整音效【WAV分">群星《2024好听新歌42》AI调整音效【WAV分</a></li> </ul> </div> </div> <div class="sidebar"> <div class="cloud"><h2 class="hometitle">一句话新闻</h2><a href="/3G/1/604673.html"><ul>高通与谷歌联手!首款骁龙PC优化Chrome浏览器发布<br><br>高通和谷歌日前宣布,推出首次面向搭载骁龙的Windows PC的优化版Chrome浏览器。<br>在对骁龙X Elite参考设计的初步测试中,全新的Chrome浏览器在Speedometer 2.1基准测试中实现了显著的性能提升。<br>预计在2024年年中之前,搭载骁龙X Elite计算平台的PC将面世。该浏览器的提前问世,有助于骁龙PC问世就获得满血表现。<br>谷歌高级副总裁Hiroshi Lockheimer表示,此次与高通的合作将有助于确保Chrome用户在当前ARM兼容的PC上获得最佳的浏览体验。</ul></a></div> <div class="cloud"><h2 class="hometitle">标签云</h2><ul><a href="/search.asp?key=1080P高清&m=1">1080P高清<span>(5)</span></a><a href="/search.asp?key=高清电影&m=1">高清电影<span>(5)</span></a><a href="/search.asp?key=百度云盘&m=1">百度云盘<span>(5)</span></a><a href="/search.asp?key=网盘下载&m=1">网盘下载<span>(4)</span></a><a href="/search.asp?key=破解软件&m=1">破解软件<span>(4)</span></a><a href="/search.asp?key=绿色软件&m=1">绿色软件<span>(4)</span></a><a href="/search.asp?key=磁力链接&m=1">磁力链接<span>(3)</span></a><a href="/search.asp?key=强度天梯&m=1">强度天梯<span>(3)</span></a><a href="/search.asp?key=福利资源&m=1">福利资源<span>(2)</span></a><a href="/search.asp?key=王者荣耀&m=1">王者荣耀<span>(2)</span></a><a href="/search.asp?key=黑钻活动&m=1">黑钻活动<span>(2)</span></a><a href="/search.asp?key=WPS会员&m=1">WPS会员<span>(2)</span></a><a href="/search.asp?key=刷图排行&m=1">刷图排行<span>(1)</span></a><a href="/search.asp?key=网盘限速&m=1">网盘限速<span>(1)</span></a><a href="/search.asp?key=鬼灭之刃&m=1">鬼灭之刃<span>(1)</span></a><a href="/search.asp?key=免费韩国漫画&m=1">免费韩国漫画<span>(1)</span></a><a href="/search.asp?key=宫本重做&m=1">宫本重做<span>(1)</span></a><a href="/search.asp?key=免费动漫&m=1">免费动漫<span>(1)</span></a></ul></div> </div> <div class="sidebar"> 友情链接:<a href="http://www.imxmx.com/" title="杰晶网络" target="_blank">杰晶网络</a> <a href="/" title="DDR爱好者之家" target="_blank">DDR爱好者之家</a> <a href="http://www.nqxw.com/" title="南强小屋" target="_blank">南强小屋</a> <a href="http://www.paidiu.com/" title="黑松山资源网" target="_blank">黑松山资源网</a> <a href="http://www.dyhadc.com/" title="白云城资源网" target="_blank">白云城资源网</a> <a href="/sitemap1.xml">站点地图</a> <a href="/sitemap.xml">SiteMap</a> </div> </article> <footer> <p>Design by <a href="http://m.ddrfans.com">DDR爱好者之家</a> <a href="http://m.ddrfans.com">http://m.ddrfans.com</a></p> </footer> <script src="/images3g/nav.js"></script> <script type="text/javascript"> jQuery.noConflict(); jQuery(function() { var elm = jQuery('#left_flow2'); var startPos = jQuery(elm).offset().top; jQuery.event.add(window, "scroll", function() { var p = jQuery(window).scrollTop(); jQuery(elm).css('position', ((p) > startPos) ? 'fixed' : ''); jQuery(elm).css('top', ((p) > startPos) ? '0' : ''); }); }); </script> </body> </html>