手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >js操作Xml(向服务器发送Xml,处理服务器返回的Xml)(IE下有效)
js操作Xml(向服务器发送Xml,处理服务器返回的Xml)(IE下有效)
摘要:前台:复制代码代码如下:js操作Xml(向服务器发送Xml,处理服务器返回的Xml)(IE下有效)AjaxServer:复制代码代码如下:u...

前台:

复制代码 代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head>

<title>js操作Xml(向服务器发送Xml,处理服务器返回的Xml)(IE下有效)</title>

<script type="text/javascript"><></script>

</head>

<body>

<input type="button" value="request" />

</body>

</html>

Ajax Server:

复制代码 代码如下:

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using System.Xml;

public partial class testXml_Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

XmlDocument xmldoc = new XmlDocument();

xmldoc.Load(Request.InputStream);//接收到客户端传来的xml

XmlNode rootnode = xmldoc.DocumentElement;

XmlNode pwd = rootnode.SelectSingleNode("pwd");

pwd.InnerText = "changed";//服务器端改变xml文档内容

Response.Write(xmldoc.InnerXml);//返回修改后的Xml文档

Response.End();

}

}

【js操作Xml(向服务器发送Xml,处理服务器返回的Xml)(IE下有效)】相关文章:

Angular发布1.5正式版,专注于向Angular 2的过渡

javascript判断并获取注册表中可信任站点的方法

AngularJS 2.0新特性有哪些

Bootstrap基础学习

脚本写的IE右键助手

JavaScript基本数据结构

jQuery fancybox在ie浏览器下无法显示关闭按钮的解决办法

简介JavaScript中toTimeString()方法的使用

动态提示的下拉框

创建你的第一个AngularJS应用的方法

精品推荐
分类导航