下面是asp中的例子:
The following Microsoft® JScript® example posts a DOMDocument containing order information to an Active Server Pages (ASP) page on a server and returns the result as a new XML document.<script language="JScript">
function PostOrder(xmldoc)
{
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.4.0");
xmlhttp.Open("POST", "http://myserver/orders/processorder.asp", false);
xmlhttp.Send(xmldoc);
return xmlhttp.responseXML;
}
</script>
The ASP page on the server loads the posted XML document, processes the order, and builds a resulting XML document.<%@ language=javascript %>
<%
Response.Expires = -1000;
// Load the posted XML document.
var doc = Server.CreateObject("Msxml2.DOMDocument.4.0");
doc.load(Request);
var result = Server.CreateObject("Msxml2.DOMDocument.4.0");
// Now process the order and build the result document.
Response.ContentType = "text/xml";
result.save(Response);
%>
在jsp页面里怎么办??????
The following Microsoft® JScript® example posts a DOMDocument containing order information to an Active Server Pages (ASP) page on a server and returns the result as a new XML document.<script language="JScript">
function PostOrder(xmldoc)
{
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.4.0");
xmlhttp.Open("POST", "http://myserver/orders/processorder.asp", false);
xmlhttp.Send(xmldoc);
return xmlhttp.responseXML;
}
</script>
The ASP page on the server loads the posted XML document, processes the order, and builds a resulting XML document.<%@ language=javascript %>
<%
Response.Expires = -1000;
// Load the posted XML document.
var doc = Server.CreateObject("Msxml2.DOMDocument.4.0");
doc.load(Request);
var result = Server.CreateObject("Msxml2.DOMDocument.4.0");
// Now process the order and build the result document.
Response.ContentType = "text/xml";
result.save(Response);
%>
在jsp页面里怎么办??????
解决方案 »
- There is no statement named student.selectByPrimaryKey in this SqlMap.
- 问下HIBERNATE URL地址用 机器名连接可否????
- 求助,使用JSP做一个类似百度文库使用Flash来显示内容
- struts2 如何在tomcat启动时的信息屏蔽
- 求助 Oracle 10g 64位 jdbcurl
- tomcat5.5安装后出现的奇怪问题
- jsp中怪怪的问题,高手必看
- 庆祝~~~散分^_^
- help me
- 菜鸟问题!!!help!
- 用JSP编写函数获取网页中文本框的值,给100分。
- 在线等。我把statement放入了jsp的pageContext中。请问该如何执行statement.close();
var oXMLDoc = new ActiveXObject('MSXML');
oXMLDoc.url = "test.jsp?param="test";
var oRoot=oXMLDoc.root;//数据就在这里拉(root是test.jsp的根)
if(oRoot.children != null){
for(var i=0;i<oRoot.children.length;++i)
{
oItem = oRoot.children.item(i);
oItem1=oRoot.children.item(++i);
sId=oItem1.text;
sName = oItem.text;
// 上面4句取值
var oOption = document.createElement('OPTION');//
oOption.text = sName;
oOption.value = sId;
form1.List.options.add(oOption);
//显示在本页的下拉列表中
}
</script>test.jsp中文件如下
<?xml version="1.0" encoding="gb2312"?>
<root>
<name>a</name>
<value>1</value>
<name>b</name>
<value>2</value>
<name>c</name>
<value>3</value>
</root>
}
我的意思是在客户端的页面上向服务器上发送一个消息,然后服务器上的页面经过处理把消息再返回给客户端,客户端利用从服务器上得到的消息执行一些动作,可以实现不刷新页面就可改变页面中的内容。