标签:传递 .ajax option php stat arc row rip xmlhttp
<script>
/* $(document).ready(function() {
$("#clearCac").click(function() {
var user = $(‘#user‘).val();
var password = $(‘#password‘).val();
$.ajax({
url: "xx.php",
type: "post",
data: { user: user,password:password},
dataType: "json",
success:function(data) {
console.log(data)
$(‘p span‘).text(data.news)
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert(‘发送错误‘)
},
complete: function(XMLHttpRequest, textStatus) {
// 调用本次AJAX请求时传递的options参数
}
});
});
});*/
$(function(){
var user = $(‘#user‘).val();
var password = $(‘#password‘).val();
$.ajax({
url: "xx.php",
type: "post",
data: { user: user,password:password},
dataType: "json",
success:function(data) {
console.log(data)
$(‘p span‘).text(data.news)
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert(‘发送错误‘)
},
complete: function(XMLHttpRequest, textStatus) {
// 调用本次AJAX请求时传递的options参数
}
});
})
</script>
标签:传递 .ajax option php stat arc row rip xmlhttp
原文地址:http://www.cnblogs.com/weiwentaweb/p/6662208.html