文章正文

网站-ajax跨域访问-示例demo

【文章】2020-04-23

简介网站-ajax跨域访问-示例demo

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ajax跨域访问-示例demo</title>
</head>

<body>
<div class="box">
	<div class="title">网站-ajax跨域访问-示例demo</div>
</div>
<script src="./jquery-1.8.3.min.js"></script>
<script type="text/javascript">
$.ajax({
    type: "get",
    url: 'xxxurl',
    data: { id: 'xxxx', name: 'xxxx' },
    dataType: "jsonp",
    success: function(data) {
        console.log('sucsess')
    },
    error: function(XMLHttpRequest, textStatus, errorThrown) {
        console.log('error')
    }
});
</script>
</body>
</html>

打赏支持

感谢您的支持,加油!

打开微信扫码打赏,你说多少就多少

找书费时,联系客服快速获取!

扫码支持

在线客服8:30-22:30,若离线请留言!

获取教程,请联系在线客服!

扫码支持

在线客服8:30-22:30,若离线请留言!

热门阅读

找PDF电子书,太费时间?

  • 微信扫描二维码,让客服快速查找。
  • 在线客服8:30-22:00,若离线请留言!