如题所示:
还有怎样设置area的其它一些属性啊?
貌似style属性不起作用啊!
我想在鼠标移入热区图片时,动态为其添加一个边框,
在鼠标移出热区图片时,添加的边框消失。
请问怎样实现啊?

解决方案 »

  1.   

    来个最简单的...
    <HEAD>
    <STYLE>
    .applyBorder { border:0.2cm groove orange }
    .removeBorder { border:none }
    </STYLE>
    </HEAD>
    <BODY>
    <Textarea onmouseover="this.className='applyBorder'"
    onmouseout="this.className='removeBorder'"></Textarea>
    </body>话说..你在屠版吗?
      

  2.   

    area不能设置border, 可改用flash svg vml之类的实现。
      

  3.   

    额...看成TEXTAREA了...继续休息下...
      

  4.   

    图片热点不支持border
    只能用绝对定位的div来模拟区域边框。
    <style> 
    *{margin:0;} 
    </style> 
    <script language="JavaScript"> 
    function createDiv(left,top,width,height) 

        var rect=document.createElement("DIV"); 
        rect.id="rect"; 
        rect.style.position="absolute"; 
        rect.style.left=left; 
        rect.style.top=top; 
        rect.style.width=width; 
        rect.style.height=height; 
        rect.style.border="2px solid #eb545d"; 
        document.body.appendChild(rect); 
        
        var info=document.createElement("DIV"); 
        info.id="info"; 
        info.style.position="absolute"; 
        info.style.marginTop=5; 
        info.style.left=left; 
        info.style.top=top+height; 
        info.style.width=width; 
        info.style.height=height/2; 
        info.style.backgroundColor="#eb545d"; 
        info.innerHTML="文本"; 
        document.body.appendChild(info); 

    function removeDiv() 

        var rect=document.getElementById("rect"); 
        if(rect) 
        { 
            document.body.removeChild(rect); 
        } 
        var info=document.getElementById("info"); 
        if(info) 
        { 
            document.body.removeChild(info); 
        } 
    } </script> 
    <img src="http://www.baidu.com/img/baidu_logo.gif" border="0" usemap="#SystemMap" id="img1" style="margin:0"/> 
    <map id="SystemMap" name="SystemMap"> 
    <area shape="rect" coords="0,0,108,130" href="http://www.baidu.com/" alt="Bai" onmouseover="createDiv(0,0,108,130)" onmouseout="removeDiv()"/> 
    <area shape="rect" coords="108,0,160,130" href="http://www.baidu.com/" alt="Logo" onmouseover="createDiv(108,0,52,130)" onmouseout="removeDiv()"/> 
    <area shape="rect" coords="160,0,270,130" href="http://www.baidu.com/" alt="百度" onmouseover="createDiv(160,0,110,130)" onmouseout="removeDiv()"/> 
    </map>