<html>
<head>
<title>无标题文档</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="删除此行">'+(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("就是这行----"+ 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>请输入经销商的通讯信息:</h3>
姓 名: <input type="text" name="jxname"><br>
地 址: <input type="text" name="jxadd"><br>
电 话: <input type="text" name="jxtel"><br>
请输入库存信息<br>
<table id="tb" width="100%" border="1" align="center" cellpadding="1" cellspacing="1" style="border-collapse:collapse" bordercolor="#111111">
<tr>
<th scope="col" width="25%">品名</th>
<th scope="col" width="25%">规格</th>
<th scope="col" width="25%">库存量</th>
<th scope="col" width="25%">操作</th>
</tr>
<tr id="blankRow" onClick="addRow(this.parentElement)">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<input type="hidden" name="count" value="count">
<input type="submit" id="btnSub" name="btnSub" value="提交"><br>
</form>
<div id="div1" style="display:none "><input id="txt" type="text" name="id" style="width:97%; background-color:#FFFFEF"></div>
<div id="div2" style="display:none "><input id="txt" type="text" name="id1" style="width:97%; background-color:#FFFFEF" value="11"></div>
</body>
<div id="div3" style="display:none "><select name="id2" style="width:97%; background-color:#FFFFEF" >
<option value="箱">箱</option>
<option value="件">件</option>
</select></div>
<div id="div4" style="display:none "><input id="txt" type="text" name="id3" style="width:97%; background-color:#FFFFEF" value="33"></div>
<script language="javascript">
function checkv()
{
if (form1.jxname.value.length == 0)
{
alert("请填写姓名和地址!");
form1.jxname.focus();
return false;
}
else if(!(check_number(form1.id1.value)))
{
alert("数量只能为数字")
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);
}
</script>
</html>
2. 2.asp文件
<%
'////////////////////取表单数据
response.write("共"+request.form("count")+"记录")
i=request.form("count")
jxname=request.form("jxname")
jxadd=request.form("jxadd")
jxtel=request.form("jxtel")
response.write(request.form("jxname"))
response.write("<br>")
response.write(request.form("jxadd"))
response.write("<br>")
response.write(request.form("jxtel"))
response.write("<br>")
str1=trim(request.form("id1"))
str2=trim(request.form("id2"))
str3=trim(request.form("id3"))
arrayA=Split(str1,",")
arrayb=Split(str2,",")
arrayc=Split(str3,",")
For i = 0 to UBound(arrayA)
Response.Write "<LI>" & arrayc(i)&"--"&arrayb(i)&"--"&arrayA(i)
Next
'///////////////////写入xml文件
Dim objDom
Dim objRoot
Dim objChild1
Dim objChild2
Dim objChild3
dim objChild4
Dim objPI
Dim PINode
Set objDom = Server.CreateObject("Microsoft.XMLDOM")
'/////写入样式
Set PINode=objDom.CreateProcessingInstruction("xml-stylesheet", "type='text/xsl'
href='list.xsl'")
objDom.appendchild PINode
'/////创建根接点
Set objRoot = objDom.createElement("kucunbiao")
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")
'创建属性taborder。
Set objattTabOrder = objDom.createAttribute("taborder")
'设定taborder的属性值
objattTabOrder.Text = i
'把taborder的属性值追加到field元素中去。
objField.setAttributeNode objattTabOrder
'创建一个新的元素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)
'追加field元素为根元素的子元素。
objChild4.appendChild objField
'追加field_value做为子元素的内容
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"
'//////////释放资源
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. 用xsl显示提交的xml,list.xsl
<?xml version="1.0" encoding="gb2312" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body style="background:#DFEEBB"><left>
<h3>姓名:<xsl:value-of select="kucunbiao/jxname"/></h3>
<h3>地址:<xsl:value-of select="kucunbiao/jxadd"/></h3>
<h3>电话:<xsl:value-of select="kucunbiao/jxtel"/></h3>
<table border="1" width="600">
<xsl:apply-templates select="kucunbiao/kucun" >
</xsl:apply-templates>
</table></left>
</body>
</html>
</xsl:template>
<xsl:template match="kucun">
<tr>
<td width="60%"><div align="center">名称</div></td>
<td width="20%"><div align="center">规格</div></td>
<td width="20%"><div align="center">数量</div></td>
</tr>
<xsl:for-each select="field">
<tr>
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="guige"/></td>
<td><xsl:value-of select="shuliang"/></td>
</tr>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
<head>
<title>无标题文档</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="删除此行">'+(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("就是这行----"+ 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>请输入经销商的通讯信息:</h3>
姓 名: <input type="text" name="jxname"><br>
地 址: <input type="text" name="jxadd"><br>
电 话: <input type="text" name="jxtel"><br>
请输入库存信息<br>
<table id="tb" width="100%" border="1" align="center" cellpadding="1" cellspacing="1" style="border-collapse:collapse" bordercolor="#111111">
<tr>
<th scope="col" width="25%">品名</th>
<th scope="col" width="25%">规格</th>
<th scope="col" width="25%">库存量</th>
<th scope="col" width="25%">操作</th>
</tr>
<tr id="blankRow" onClick="addRow(this.parentElement)">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<input type="hidden" name="count" value="count">
<input type="submit" id="btnSub" name="btnSub" value="提交"><br>
</form>
<div id="div1" style="display:none "><input id="txt" type="text" name="id" style="width:97%; background-color:#FFFFEF"></div>
<div id="div2" style="display:none "><input id="txt" type="text" name="id1" style="width:97%; background-color:#FFFFEF" value="11"></div>
</body>
<div id="div3" style="display:none "><select name="id2" style="width:97%; background-color:#FFFFEF" >
<option value="箱">箱</option>
<option value="件">件</option>
</select></div>
<div id="div4" style="display:none "><input id="txt" type="text" name="id3" style="width:97%; background-color:#FFFFEF" value="33"></div>
<script language="javascript">
function checkv()
{
if (form1.jxname.value.length == 0)
{
alert("请填写姓名和地址!");
form1.jxname.focus();
return false;
}
else if(!(check_number(form1.id1.value)))
{
alert("数量只能为数字")
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);
}
</script>
</html>
2. 2.asp文件
<%
'////////////////////取表单数据
response.write("共"+request.form("count")+"记录")
i=request.form("count")
jxname=request.form("jxname")
jxadd=request.form("jxadd")
jxtel=request.form("jxtel")
response.write(request.form("jxname"))
response.write("<br>")
response.write(request.form("jxadd"))
response.write("<br>")
response.write(request.form("jxtel"))
response.write("<br>")
str1=trim(request.form("id1"))
str2=trim(request.form("id2"))
str3=trim(request.form("id3"))
arrayA=Split(str1,",")
arrayb=Split(str2,",")
arrayc=Split(str3,",")
For i = 0 to UBound(arrayA)
Response.Write "<LI>" & arrayc(i)&"--"&arrayb(i)&"--"&arrayA(i)
Next
'///////////////////写入xml文件
Dim objDom
Dim objRoot
Dim objChild1
Dim objChild2
Dim objChild3
dim objChild4
Dim objPI
Dim PINode
Set objDom = Server.CreateObject("Microsoft.XMLDOM")
'/////写入样式
Set PINode=objDom.CreateProcessingInstruction("xml-stylesheet", "type='text/xsl'
href='list.xsl'")
objDom.appendchild PINode
'/////创建根接点
Set objRoot = objDom.createElement("kucunbiao")
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")
'创建属性taborder。
Set objattTabOrder = objDom.createAttribute("taborder")
'设定taborder的属性值
objattTabOrder.Text = i
'把taborder的属性值追加到field元素中去。
objField.setAttributeNode objattTabOrder
'创建一个新的元素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)
'追加field元素为根元素的子元素。
objChild4.appendChild objField
'追加field_value做为子元素的内容
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"
'//////////释放资源
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. 用xsl显示提交的xml,list.xsl
<?xml version="1.0" encoding="gb2312" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body style="background:#DFEEBB"><left>
<h3>姓名:<xsl:value-of select="kucunbiao/jxname"/></h3>
<h3>地址:<xsl:value-of select="kucunbiao/jxadd"/></h3>
<h3>电话:<xsl:value-of select="kucunbiao/jxtel"/></h3>
<table border="1" width="600">
<xsl:apply-templates select="kucunbiao/kucun" >
</xsl:apply-templates>
</table></left>
</body>
</html>
</xsl:template>
<xsl:template match="kucun">
<tr>
<td width="60%"><div align="center">名称</div></td>
<td width="20%"><div align="center">规格</div></td>
<td width="20%"><div align="center">数量</div></td>
</tr>
<xsl:for-each select="field">
<tr>
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="guige"/></td>
<td><xsl:value-of select="shuliang"/></td>
</tr>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
暂无评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。
更新日志
2024年11月23日
2024年11月23日
- 凤飞飞《我们的主题曲》飞跃制作[正版原抓WAV+CUE]
- 刘嘉亮《亮情歌2》[WAV+CUE][1G]
- 红馆40·谭咏麟《歌者恋歌浓情30年演唱会》3CD[低速原抓WAV+CUE][1.8G]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[320K/MP3][193.25MB]
- 【轻音乐】曼托凡尼乐团《精选辑》2CD.1998[FLAC+CUE整轨]
- 邝美云《心中有爱》1989年香港DMIJP版1MTO东芝首版[WAV+CUE]
- 群星《情叹-发烧女声DSD》天籁女声发烧碟[WAV+CUE]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[FLAC/分轨][748.03MB]
- 理想混蛋《Origin Sessions》[320K/MP3][37.47MB]
- 公馆青少年《我其实一点都不酷》[320K/MP3][78.78MB]
- 群星《情叹-发烧男声DSD》最值得珍藏的完美男声[WAV+CUE]
- 群星《国韵飘香·贵妃醉酒HQCD黑胶王》2CD[WAV]
- 卫兰《DAUGHTER》【低速原抓WAV+CUE】
- 公馆青少年《我其实一点都不酷》[FLAC/分轨][398.22MB]
- ZWEI《迟暮的花 (Explicit)》[320K/MP3][57.16MB]