Posted on
2013-01-24 15:20shenyixin
阅读(1038)
评论(0)
收藏举报
var js = "alert('B:' + this.id); return false;";
// creates a function from the "js" stringvar newclick = eval("(function(){"+js+"});");
// clears onclick then sets click
$("#anchor").attr('onclick', '').click(newclick);