开发者

Remove event with jquery

开发者 https://www.devze.com 2023-01-04 18:20 出处:网络
I have the following at html code <a class=\"toolbar\" onclick=\"javascript: submitbutton(\'items\')\" href=\"#\">

I have the following at html code

<a class="toolbar" onclick="javascript: submitbutton('items')" href="#">

Now i 开发者_如何转开发want that in jquery i convert it to

 <a class="toolbar" href="javascript:history.go(-1)">

Any ideas


Do you mean like that?

$('.toolbar').removeAttr('onclick').attr('href','javascript:history.go(-1)');
0

精彩评论

暂无评论...
验证码 换一张
取 消