<title> Untitled Document </title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<script language= "JavaScript" >
var currow=null;
var Y=1;
function SelectRow () {
var e=window.event;
var tr1=e.srcelement;
if (Currow)
Currow.bgcolor= "#FFFFFF";
Tr1.bgcolor= "E7e7e7";
CURROW=TR1;
}
function AddRow (SRC) {
alert (SRC);
var newrow = Src.insertrow (src.rows.length-1);
Newrow.attachevent ("onclick", SelectRow);
newrow.height=20;
var i=4;
while (i--) {
var Newcell = Newrow.insertcell ();
switch (i) {
Case 0:newcell.innerhtml= ' <input type= ' button "onclick=" Javascript:delrow (this.parentElement.parentElement) " Value= "Delete this row" > ' + (y++);
Document.all.count.value=y-1;
Break
Case 1:newcell.innerhtml=div2.innerhtml;break;
Case 2:newcell.innerhtml=div3.innerhtml;break;
Case 3:newcell.innerhtml=div4.innerhtml;break;
Default:newcell.innerhtml=div1.innerhtml;break;
}
}
alert (newrow.outerhtml);
}
function Delrow (SRC) {
var tab=src.parentelement;
var i=tab.rows.length;
var j=tab.rows.length;
while (i--) {
if (Src==tab.rows[i]) {
Alert ("This is the line----" + i);
document.all.count.value=j-3;
Tab.deleterow (i);
if (form1.jxname.value.length = 0)
{
Alert ("Please fill in your name and address!") ");
Form1.jxname.focus ();
return false;
}
else if (! ( Check_number (Form1.id1.value))
{
Alert ("Quantity can only be a number")
Form1.id1.focus ();
return false;
}
Else
return (true);
}
function Check_number (Myint)
{
var Checkok = "0123456789";
var checkstr = Myint;
var allvalid = true;
var decpoints = 0;
var allnum = "";
for (i = 0; i < checkstr.length; i++)
{
ch = checkstr.charat (i);
for (j = 0; J < Checkok.length; J + +)
if (ch = = Checkok.charat (j))
Break
if (j = = Checkok.length)
{
Allvalid = false;
Break
}
Allnum + = ch;
}
if (!allvalid)
{
return (false);
}
return (true);
}
For i = 0 to UBound (Arraya)
Response.Write "<LI>" & Arrayc (i) & "--" &arrayb (i) & "--" &arraya (i)
Next
'///////////////////write to XML file
Dim Objdom
Dim Objroot
Dim ObjChild1
Dim ObjChild2
Dim objChild3
Dim objChild4
Dim OBJPI
Dim Pinode
Set objdom = Server.CreateObject ("Microsoft.XMLDOM")
'/////write style
Set pinode=objdom.createprocessinginstruction ("Xml-stylesheet", "type= ' text/xsl ')
Objdom.appendchild Objroot
Set objChild1 = objdom.createelement ("Jxname")
Objchild1.text=jxname
Objroot.appendchild ObjChild1
Set objChild2 = objdom.createelement ("Jxadd")
Objchild2.text=jxadd
Objroot.appendchild ObjChild2
Set Objchild3=objdom.createelement ("Jxtel")
Objchild3.text=jxtel
Objroot.appendchild objChild3
Set Objchild4=objdom.createelement ("Kucun")
Objroot.appendchild ObjChild4
For i = 0 to UBound (Arraya)
Set objfield = objdom.createelement ("field")
' Create a property taborder.
Set Objatttaborder = Objdom.createattribute ("TabOrder")
' Set the property value of the TabOrder
Objatttaborder.text = i
' Appends the attribute value of the taborder to the field element.
Objfield.setattributenode Objatttaborder
' Create a new element, Field_value.
Set objfieldvalue2= objdom.createelement ("name")
Objfieldvalue2.text = ARRAYC (i)
Set Objfieldvalue = objdom.createelement ("Guige")
Objfieldvalue.text = Arrayb (i)
Set Objfieldvalue1=objdom.createelement ("Shuliang")
Objfieldvalue1.text = Arraya (i)
' Appends a field element to the child element of the root element.
Objchild4.appendchild Objfield
' Append Field_value as the content of the child element
Objfield.appendchild Objfieldvalue
Objfield.appendchild objFieldValue1
Objfield.appendchild objFieldValue2
Next
Set OBJPI = objdom.createprocessinginstruction ("xml", "version= ' 1.0")
Objdom.insertbefore Objpi, objdom.childnodes (0)
Objdom.save "F:\xml\" &jxname& ". xml"
'//////////release Resources
Set objdom = Nothing
Set Objroot = Nothing
Set Objfield = Nothing
Set Objfieldvalue = Nothing
Set Objattid = Nothing
Set Objatttaborder = Nothing
Set OBJPI = Nothing
Set pinode=nothing
%>
3. Xml,list.xsl submitted with XSL display
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.