jQuery文档加载未被调用

时间:2017-07-25 17:23:16

标签: javascript jquery

当我点击按钮时没有任何反应,我找不到我的错误:

<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>
你能给我一个兴奋吗?

1 个答案:

答案 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>
相关问题