当我单击按钮时没有任何反应,我找不到我的错误:
<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>
你能帮我一下吗?
最佳答案
试试这个代码。
<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>
关于javascript - jQuery 文档加载未被调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45309934/