ajax测试程序
发布时间:2020-12-16 03:29:00 所属栏目:百科 来源:网络整理
导读:记录一个ajax的一个测试程序 !DOCTYPE html html head meta charset = "UTF-8" title / title % #include virtual= "/include/page.html" % / head body button class = "btn" 按钮 / button script $( ".btn" ).click( function () { console.log( "ajax fu
记录一个ajax的一个测试程序 <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<% #include virtual="/include/page.html"%>
</head>
<body>
<button class="btn">按钮</button>
<script> $(".btn").click(function(){ console.log("ajax func"); $.ajax({ url: 'status.asp',async:true,dataType: 'json',type: 'post',data:{"StatusType":"2"},success: function(data) { console.log(data); console.log("2"); },error: function(xhr,type,errorThrown) { console.log("加载失败2"); } }); }); </script>
</body>
</html>
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |