简体   繁体   English

如何在其中添加href属性 <area> 用jQuery标记?

[英]How to add href attribute in <area> tag with jquery?

如何使用jQuery在<area>标记中添加href属性?

<area alt="Drenthe" title="Drenthe" shape="poly" coords="141,44,145,38,154,43,159,43,168,54,171,57,173,68,174,77,172,77,169,77,172,77,170,79,168,77,166,77,154,77,151,77,147,79,139,75,135,73,136,68,136,62,139,59,144,59,146,57,146,53,144,51,142,48,142,44,140,39,144,39" filter="/vakantiehuizen/nederland/drenthe">
 $('area[title="Drenthe"]').attr('href','http://example.com');

使用.attr()

$('your-area-selecor').attr('href', 'value')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM