开发者

Why does $.post not do anything?

<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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜