答案 0 :(得分:1)
搜索ajax。例如(使用jQuery)
$.ajax({ url: "website.com/phpfile.php?var=" + encodeURIComponent(value),
cache: false,
timeout: 10000,
success: function(response)
{
// do something with the result, or omit the whole success if not needed
},
error: function(jqXHR, textStatus, errorThrown)
{
// notify user about error?
}
});
有更简单,更面向的版本,例如$ .post或$ .get 点击此处:http://api.jquery.com/category/ajax/