jquery attr(“onClick”) - ie and ff

后端 未结 5 801
长情又很酷
长情又很酷 2021-01-13 01:12

Using jquery, I\'d like to get the javascript from an A tag\'s onClick attribute.


In Fir

5条回答
  •  温柔的废话
    2021-01-13 02:10

    Better than adding onclick attribute is behalf of IE6 / IE7 this solution:

    $("a").click(function () { .. anything to do .. })
    

提交回复
热议问题