Heim >Web-Frontend >js-Tutorial >JQuery-Bindungs-Klickereignis-Beispielcode für eine tag_jquery
$(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}"; } }); }); }); <a name="del">删除</a> <a class="del2">删除2</a>