<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<button onclick="tuling()">dianji</button>
</body>
<script type="text/javascript">
var data = "key=a5f941bfe2f04ce4bb4ef3f27b7e4900&userid=389152&info='你的名字是?'";
function tuling(){
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function(){
if(this.readyState == 4 && this.status == 200){
window.alert(xhttp.responseText);
}
}
xhttp.open("POST","http://www.tuling123.com/openapi/api",true);
xhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhttp.send(data);
}
</script>
</html>
ajax图灵机器人
最新推荐文章于 2021-03-11 22:10:55 发布