我在這裏丟失了什麼?使用jquery對標籤的點擊事件採取行動
<script type="text/javascript" src="static/js/jquery-1.7.2.js"></script>
<script>
$("a").click(function() {
alert("Handler for .click() called.");
window.location.reload();
});
</script>
<li><a id='fu' href="change_password" target="content">Change Password</a>
<li><a id='fu' href="delete_user" target="content">Delete User</a></li>
我點擊和我沒有得到任何警告......
可能onDomReady還沒有開通。嘗試打包在$(document).ready(function(){...}); – chovy