小编Sha*_*oud的帖子

javascript $ .post将参数传递给外部PHP文件

我有

enter code here

function ajaxFunction(){
var ajaxRequest;  // The variable that makes Ajax possible!

try{
    // Opera 8.0+, Firefox, Safari
    ajaxRequest = new XMLHttpRequest();
} catch (e){
    // Internet Explorer Browsers
    try{
        ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
        try{
            ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e){
            // Something went wrong
            alert("Your browser is too old to run me!");
            return false;
        }
    }
}
// Create a function that will receive data sent from the server
ajaxRequest.onreadystatechange = …
Run Code Online (Sandbox Code Playgroud)

javascript php ajax json xmlhttprequest

-2
推荐指数
1
解决办法
899
查看次数

标签 统计

ajax ×1

javascript ×1

json ×1

php ×1

xmlhttprequest ×1