jquery 为a标签绑定click事件示例代码
$(document).ready(function(){
$("a[name='del']").click(function(){
Ext.Msg.confirm('提示','你确定要删除该公告吗?',function(button,text){
if(button=='yes'){
window.location.href="/admin/note!delete.action?id=${id}";
}
});
});
$("a[class='del2']").click(function(){
Ext.Msg.confirm('提示','你确定要删除该公告吗?',function(button,text){
if(button=='yes'){
window.location.href="/admin/note!delete.action?id=${id}";
}
});
});
});
<aname="del">删除</a>
<aclass="del2">删除2</a>