mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 04:19:26 +08:00
Update safe_js.html
This commit is contained in:
@@ -82,6 +82,26 @@ function ajax(type,bool){
|
||||
}
|
||||
};
|
||||
|
||||
xhr.get = function(url,result){
|
||||
//添加回调函数
|
||||
var name ='PHPjs';
|
||||
var r = name + '_' + Math.random().toString().substr(2);//随机
|
||||
|
||||
xhr.url = url+'&'+name+'='+r;
|
||||
|
||||
if(result!=null){
|
||||
xhr.XHR.onreadystatechange = xhr.processHandle;
|
||||
xhr.result = result;
|
||||
}
|
||||
if(window.XMLHttpRequest){
|
||||
xhr.XHR.open('GET',xhr.url,xhr.async);
|
||||
xhr.XHR.send(null);
|
||||
}else{
|
||||
xhr.XHR.open('GET',xhr.url,xhr.async);
|
||||
xhr.XHR.send();
|
||||
}
|
||||
};
|
||||
|
||||
xhr.post = function(url,send,result){
|
||||
xhr.url = url;
|
||||
if(typeof(send) == 'object'){
|
||||
|
||||
Reference in New Issue
Block a user