日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

一個在客戶端生成并使用XML的例子(2)_Xml教程

編輯Tag賺U幣
教程Tag:暫無Tag,歡迎添加,賺取U幣!

推薦:XSL簡明教程(5)XSL的索引
原著:Jan Egil Refsnes 翻譯:阿捷 五. XSL 的索引 如果我需要將元素的顯示按一定的順序排列,應(yīng)該如何建立XSL的索引呢? 我們還是來看前面的例子,還是這段代碼: <?xml versio

<script language="JavaScript">
file://-----global var define -------
var ItemNo=0; file://how many Items born and die
var objDom = new ActiveXObject("MSXML.DOMDocument"); file://define a DOM object
objDom.async=false;
var objRoot = objDom.createElement("EPR"); file://create the root "EPR"
objDom.appendChild(objRoot)
var xmlHTTP = new ActiveXObject("Microsoft.XMLHTTP"); file://create the XMLHTTP object for Save XML without Refrsh Page

file://-------add a new node----------
function add()
{
ItemNo ;
var ItemSec=document.all.addItem.children.length; // how many alive Items
ItemSec ;

var objField = objDom.createElement("Item") file://create node "EPR-->Item"
objDom.documentElement.appendChild(objField);

curnode=objDom.documentElement.lastChild; file://look for last added node
var namedNodeMap =curnode.attributes;

var objattID = objDom.createAttribute("ItemNo"); file://add attribute "ItemNo "
objattID.text =ItemNo
namedNodeMap.setNamedItem(objattID);

var objattID = objDom.createElement("Name") file://create node "EPR-->Item-->name"
objattID.text=document.formItem.ItemName.value
curnode.appendChild(objattID)
document.formItem.ItemName.value="";

var objattID = objDom.createElement("Mount") file://create node "EPR-->Item-->Mount"
objattID.text=document.formItem.Mount.value
curnode.appendChild(objattID)
document.formItem.Mount.value=""

var objattID = objDom.createElement("Spec") file://create node "EPR-->Item-->Spec"
objattID.text=document.formItem.Spec.value
curnode.appendChild(objattID)
document.formItem.Spec.value=""

var objattID = objDom.createElement("price") file://create node "EPR-->Item-->Price"
objattID.text=document.formItem.price.value
curnode.appendChild(objattID)
document.formItem.price.value=""

saveXML(); file://save in Server with ASP

分享:XML卷之實戰(zhàn)錦囊(3):動態(tài)分頁
動機:為了方便用戶查看大批量數(shù)據(jù),我們會用到動態(tài)分頁,因此分頁功能是我們在網(wǎng)站上見過的最普遍也是最常用的一個功能模塊了。而以往的信息分頁都是連接到數(shù)據(jù)庫的,每一次點擊都必須要后臺數(shù)

來源:模板無憂//所屬分類:Xml教程/更新時間:2008-08-22
相關(guān)Xml教程