Asp retrieves data from dynamic forms and writes it to an xml file. It is displayed in xsl.

Source: Internet
Author: User
Tags xsl
 
1. Dynamic form interface, refer to on csdn Forum
<Html>
<Head>
<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 );
}
}
}
</Script>
</Head>
<Body>
<Form name = "form1" action = "2.asp" method =" post "onsubmit = return (checkv ()>
<H3> enter the dealer's communication information: Last name: <input type = "text" name = "jxname"> <br>
Address: <input type = "text" name = "jxadd"> <br>
Tel: <input type = "text" name = "jxtel"> <br>
Enter Inventory Information <br>
<Table id = "tb" width = "100%" border = "1" align = "center" cellpadding = "1" cellspacing = "1" style = "border-collapse: collapse "bordercolor =" #111111 ">
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.