jquery attr(“onClick”) - ie and ff

后端 未结 5 769
长情又很酷
长情又很酷 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:08

    Have you tried :

    alert($('a').attr("onclick"))
    

    In XHTML onClick is not the right version.

提交回复
热议问题