开发者

Remove event with jquery

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜