[xHTML+CSS] 火狐和IE中在area中添加onFocus="this.blur();不生效

[xHTML+CSS] 火狐和IE中在area中添加onFocus="this.blur();不生效,第1张

您好!很高兴为您答疑。

有鉴于您的需求,您是在表格之上添加热点区域,然后在热点区域里面进行点击,而点击之后又要热点周边不要出现示边框。

<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()'/>"


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/11324695.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-15
下一篇2023-05-15

发表评论

登录后才能评论

评论列表(0条)

    保存