怎样设置area的border属性啊? 如题所示:还有怎样设置area的其它一些属性啊?貌似style属性不起作用啊!我想在鼠标移入热区图片时,动态为其添加一个边框,在鼠标移出热区图片时,添加的边框消失。请问怎样实现啊? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 来个最简单的...<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>话说..你在屠版吗? area不能设置border, 可改用flash svg vml之类的实现。 额...看成TEXTAREA了...继续休息下... 图片热点不支持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> JS 正则 高手进,js拖动的问题! js代码含义 用JS验证Email格式。 这句代码里的符号是什么意思? 批量上传控件的问题 高手请进 如何动态创建ActiveX控件 关于变量的简单问题! 关于多选select值的问题(不好意思,我已经没有分给了) 实现‘保存’功能的按钮,用javespcript怎么写 怪异的问题 问题求助
<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>话说..你在屠版吗?
只能用绝对定位的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>