Famous of web2.0, the script language pushed the web forward based on ajax technology.
Currently,many ajax frameworks can be used, such as dojo,sajax,dwr.....
But I insist on coding that by myself.
var request;
function createRequest(){
try{
request = new XMLHttpRequest();
} catch (e){
try{
request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try{
request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
alert("Your browser broke!");
return false;
}
}
}
return request;
}
function ajaxRNTMP(phpurl,stuffid,idget1,idget2,idget3,idget4,idget5,idget6,idget7){
model=getChangeValue(idget1);
table=getChangeValue(idget2);
datestart = document.getElementById(idget3).value;
dateend = document.getElementById(idget4).value;
ratio=getChangeValue(idget5);
loc=getChangeValue(idget6);
param=getChangeValue(idget7);
//TODO : Validate form
if(param==null || param==''){
alert('Sorry,Please select paramerter!');
return;
}
removePlot(stuffid,'ld');
addElement();
createRequest();
querystring = "?model="+model+"&table="+table+"&datestart="+datestart+"&dateend="+dateend+"&ratio="+ratio+"&location="+loc+"¶m="+param;
request.open("GET", phpurl+querystring, true);
request.onreadystatechange =function(){
if(request.readyState == 4){
if (request.status == 200){
removeElement();
ajaxDisplay = document.getElementById(stuffid);
loading=document.createElement('img');
loading.setAttribute('src',phpurl+querystring);
loading.setAttribute('id', 'ld');
ajaxDisplay.appendChild(loading);
}
}
};
request.send(null);
}
分享到:
相关推荐
此多为HOTAJAX下在而来的实例可方便直接调用
AJAX搜索模块AJAX搜索模块AJAX搜索模块AJAX搜索模块
基于加工图的TA2加工性能分析,李绂,罗远新,基于动态再结晶模型(DMM)的加工图可以很好地反映材料在热加工过程中的加工性能。本文旨在通过进行一系列的热压缩试验来研究TA2纯
Pick up Head Rush Ajax and learn Ajax and asynchronous programming the right way--the way that sticks. If you've ever read a Head First book, you know what to expect: a visually rich format designed...
AutoHotKey 帮助文档
window AutoHotkey中文版热键下载window AutoHotkey中文版热键下载window AutoHotkey中文版热键下载window AutoHotkey中文版热键下载window AutoHotkey中文版热键下载window AutoHotkey中文版热键下载window AutoHot...
More specifically, it is a Win32 EXE file for the Windows GUI subsystem. Authenticode signature block and FileVersionInfo properties CopyrightComfort Software Group Product Hot Virtual Keyboard 8.5....
这是一份AutoHotkey中文版手册。是一本由浅入深教会你使用AutoHotkey的手册。使用AutoHotkey后大大减轻了工作时一些重复操作的难度。如果只是要做一些简单的事件,花一点点时间按照样例上操作即可上手。完整读完这本...
AutoHotkey 中文手册
本书以客观的方式解决了可持续能源危机,分析了相关数字,并针对欧洲,美国和世界组织了针对个人和国际范围的变革计划。
hot 51增强型说明书 厂商51板子出厂手册
AutoHotkey_CN_版本_1.1.30.03 手册 中文版
autohotkey中文帮助文档chm 翻译过来就是【智能热键】帮助文档
东流电子HOT51开发板使用说明,包含详细的开发板资源和简单实验
Red+Hot+Jam(1-154)系列.torrent Red+Hot+Jam(1-154)系列.torrent
最新版AutoHotkey中文帮助文档
AutoHotkey的中文帮助文档,这是我在网上找的,现在传到这。
用MATLAB对碱基序列类型的生物数据进行onehot编码,对每一个碱基数据编码成四维数据,并求出m*n阶编码矩阵的奇异值,以期可以后续用奇异值表征编码矩阵
HOT51单片机开发板详尽资料,教您学习单片机。为您的学习助一臂之力
在线版 https://wyagd001.github.io/zh-cn/docs/AutoHotkey.htm 包含V1和V2版本 来源于https://github.com/wyagd001/wyagd001.github.io 使用时注意文档是否是最新版本,