我有我的剧本在这里,
<script type='javascript'>
$(LastRow).find('#delete').attr('onclick','Comment_Delete(event,'+cID+')')
</script>
<input type="image" id="delete" border="0" src="../Resource/images/commentcross.jpg";" style="border-width:0px;">
我希望控制呈现为,
<input type="image" id="delete" border="0" onclick="Comment_Delete(event,1048);" src="../Resource/images/commentcross.jpg";" style="border-width:0px;">
即我想将onclick
事件绑定到我的id=delete
标签。我用我的生活作为,
$(LastRow).find('#delete').live('click','Comment_Delete(event,'+cID+')')
但在 chrome 中出现错误TypeError: Cannot call method 'replace' of undefined