开发者

Why does $.post not do anything?

开发者 https://www.devze.com 2023-02-12 06:43 出处:网络
<script type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js\">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js">
<script type="text/javascr开发者_Python百科ipt">
  $(document).ready(function() {
    $.post("ajax.php", function(data) {
      alert("Data Loaded");
    });
  });
</script>

I understand that this code does nothing useful, but why does nothing happen? The php doesn't run, and the alert doesn't show.


Your first SCRIPT element is missing its closing tag </script>, which leads to the whole code being just ignored.

0

精彩评论

暂无评论...
验证码 换一张
取 消