我写了一个简单的html文件来测试按钮,当单击时调用alert(),但我看不到任何响应。任何人都可以告诉我我做错了什么?这太奇怪了。jQuery功能没有响应
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Login Form</title>
<!-- <link rel="stylesheet" href="css/signupstyle.css"> -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$("#btnSubmit").click(function(){
alert("button");
console.log("button");
});
$("#facebook").click(function(){
alert("button");
console.log("button");
});
</script>
</head>
<body>
<input id="btnSubmit" type="submit" value="Release"/>
<button id="facebook">Sign up with Facebook</button>
</body>
...或地方的''
的结束。 – raina77ow只需要注意**在结束''标签!! ** –