![[xHTML+CSS] 火狐和IE中在area中添加onFocus="this.blur();不生效,第1张 [xHTML+CSS] 火狐和IE中在area中添加onFocus="this.blur();不生效,第1张](/aiimages/%5BxHTML%2BCSS%5D+%E7%81%AB%E7%8B%90%E5%92%8CIE%E4%B8%AD%E5%9C%A8area%E4%B8%AD%E6%B7%BB%E5%8A%A0onFocus%3D%26quot%3Bthis.blur%28%29%3B%E4%B8%8D%E7%94%9F%E6%95%88.png)
有鉴于您的需求,您是在表格之上添加热点区域,然后在热点区域里面进行点击,而点击之后又要热点周边不要出现示边框。
<table>
<tr>
<td><img name="Dec_jhs_r5_c1" src="G:/Teenie Document/My Pictures/DPP_140.JPG" width="700" height="533" border="0" id="r5_c1" usemap="#r5_c1" alt="" hidefocus="true"/></td>
<td><img src="G:/Teenie Document/My Pictures/DPP_140.JPG" width="1" height="533" border="0" alt="" hidefocus="true"/></td>
</tr>
</table>
<map name="r5_c1" id="r5_c1">
<area shape="poly" coords="1,0,700,0,701,142,555,142,490,250,315,249,317,301,0,301,1,0" href="#" target="_blank" alt="" onFocus="this.blur()" />
<area shape="poly" coords="1,301,302,309,306,533,2,531,1,301" href="#" target="_blank" alt="" onFocus="this.blur()"/></map>
通过在img中加入hidefocus="true",最终实现了您所需要的效果。且代码在火狐等浏览器中通过验证。
如果对我们的回答存在任何疑问,欢迎继续问询。
newTR.insertCell(i).innerHTML= "<input id='textItem0' type='text' style='border: 0px' size='12' onfocus='focus()' onblur='blur()'/>"欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)