XMLHTTP实例
来源:互联网 发布:江西科技学院网络教学 编辑:程序博客网 时间:2024/04/29 09:38
function setValue(value)
{
deleteRow();
document.getElementById("mem_role_attid").value = "";
document.forms[0].mem_roleid.value = value.split('*')[0] ;
document.forms[0].rolename.value = value.split('*')[1];
var xmlHTTP=new ActiveXObject("Microsoft.XMLHTTP");
xmlHTTP.Open("POST","<%=request.getContextPath()%>/jsp/member/getExtvalue.jsp?mem_roleid="+document.forms[0].mem_roleid.value);
xmlHTTP.send("<extvalue attr_name=dd></extvalues>");
var template=new ActiveXObject("MSXML.DOMDocument");
alert()
template.loadXML(xmlHTTP.responseText);
template.onload=test(template);
}
function test(template){
var client=template.documentElement;
for(var i=0;i<client.childNodes.length;i++){
var attr_name=client.childNodes[i].getAttribute("attr_name");
var complexvalue=client.childNodes[i].getAttribute("complexvalue");
var datatype=client.childNodes[i].getAttribute("datatype");
var isnull=client.childNodes[i].getAttribute("isnull");
addRow(attr_name,complexvalue,datatype,isnull);
}
}
{
deleteRow();
document.getElementById("mem_role_attid").value = "";
document.forms[0].mem_roleid.value = value.split('*')[0] ;
document.forms[0].rolename.value = value.split('*')[1];
var xmlHTTP=new ActiveXObject("Microsoft.XMLHTTP");
xmlHTTP.Open("POST","<%=request.getContextPath()%>/jsp/member/getExtvalue.jsp?mem_roleid="+document.forms[0].mem_roleid.value);
xmlHTTP.send("<extvalue attr_name=dd></extvalues>");
var template=new ActiveXObject("MSXML.DOMDocument");
alert()
template.loadXML(xmlHTTP.responseText);
template.onload=test(template);
}
function test(template){
var client=template.documentElement;
for(var i=0;i<client.childNodes.length;i++){
var attr_name=client.childNodes[i].getAttribute("attr_name");
var complexvalue=client.childNodes[i].getAttribute("complexvalue");
var datatype=client.childNodes[i].getAttribute("datatype");
var isnull=client.childNodes[i].getAttribute("isnull");
addRow(attr_name,complexvalue,datatype,isnull);
}
}
- XMLHTTP实例
- XmlHttp实例
- XMLHTTP实例
- XMLHTTP应用的一个实例
- [WEB开发] 基于XMLHTTP的简单实例
- [转]基于XMLHTTP的简单实例
- 用XMLHttp获取服务器页面数据实例
- XMLHTTP
- xmlHTTP
- XMLHTTP
- XMLHTTP
- xmlhttp
- xmlhttp
- xmlhttp
- XMLHTTP
- XMLHTTP
- XmlHttp
- xmlHttp
- 最大化、最小化和关闭按钮
- Lesson 1 Excuse me!(新概念英语第一册
- 从今天起,决不改变!!
- Thread:timer
- SendMessage函数完全使用手册(ZT)
- XMLHTTP实例
- struts1.1到struts1.2.9的移植
- 国内外大型博客收集
- 为 PHP 应用提速、提速、再提速!,第 2 部分: 分析 PHP 应用程序以查找、诊断和加速运行缓慢的代码
- 好网站
- Oracle中几个关于日期方面的SQL实例Oracle中几个关于日期方面的SQL实例
- rails多对多
- 做编程遇到问题最怕不仔细
- 我以后要学会知足