开发者

how to use <map> with mouseover to automatically link into another page

开发者 https://www.devze.com 2023-02-05 04:32 出处:网络
I wanted to use MAP so whenever a person hovers the cursor over the area of a picture so he/she automatically links into another page. I cannot seem to figure out. HELP! :(

I wanted to use MAP so whenever a person hovers the cursor over the area of a picture so he/she automatically links into another page. I cannot seem to figure out. HELP! :(

this is only the partial code. The code is working fine. Thanks in advanc开发者_开发百科e!

document.write('<td> <img src="Ishaharah Plates/p ' + nCount + '.jpg" height="500" width="500" usemap="#green" border="0">');
        document.write('<map name="green">');

        <script>
        function AutoLink(sLink){document.housec.src = sLink}
        </script>

    if(parseInt(nxCount)==16)   
        document.write('<area shape="rect" onmouseover="ShowPic(this.href)" coords="375,190,450,240" href="Plate_19_1.php?XCount=' + nxCount + '&Number=1&Count=' + nCount + '&Correct=' + nCorrect + '">');

    if(parseInt(nxCount)==15)   
        document.write('<area shape="rect" coords="335,210,385,265" href="Plate_' + nCount + '_1.php?XCount=' + nxCount + '&Number=' + nAnswer + '&Count=' + nCount + '&Correct=' + nCorrect + '">');


Assuming you have an href set on the area tag, try onmouseover="window.location.href=this.href"

It would be easier to help you if you isolated the problem and posted a complete example.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号