当我点击按钮时没有任何反应,我找不到我的错误:
<html>
<head>
<script type="text/javascript" src="jquery-3.2.1.min.js" />
</head>
<body>
<script type="text/javascript">
$(document).ready(function(){
$("#btnSubmit").click(function(){
alert("button");
});
});
</script>
<input id = "btnSubmit" type="submit" value="Release"/>
</body>
</html>
你能给我一个兴奋吗?
答案 0 :(得分:1)
试试这段代码。
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(document).ready(function(){
$("#btnSubmit").click(function(){
alert("button");
});
});
</script>
<input id = "btnSubmit" type="submit" value="Release"/>
</body>
</html>