AjaxGet请求方式:

<script type="text/javascript">
    $.ajax({
        type: "GET",
        dataType: "html",
        url: "test.htm",
        data: {}, //参数信息,采用JS对象的形式,也可以使用URL地址比较传统的&将参数分隔
        error: function () {
            alert("获取数据失败");
        },
        beforeSend: function () {
            alert("发送请求之前出现错误");
        },
        success: function (data) {
            $("#list").html(data)
        }
    });
</script>
View Code

相关文章:

  • 2021-12-17
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-07
  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
  • 2022-01-25
相关资源
相似解决方案