回 帖 发 新 帖 刷新版面

主题:怎样在lest.asp中遍历取得<TD name=

怎样在lest.asp中遍历取得提交过来<TD name="T1">的数据?

index.asp 的代码如下:
----------------------------------
<script language="JavaScript">
<!--
function SubmitAndSetBlank(){
if( confirm('您确定进行下注吗?') ){
 document.myForm.submit();
}
}
//-->
</script>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页</title>
</head>
<body>
<form name="myform" method="POST" action="lest.asp?action=edit">
<table>
<tr>
   <td id="T1" name="T1">12345</td>
   <td id="">
    <input type="submit" value="按钮" name="B1" onClick="SubmitAndSetBlank()"><input type="reset" value="重置" name="B2"></td>
</tr>
</table>
</form>
</body>
</html>

lest.asp 的代码如下:(为什么不行?)
--------------------------------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<%dim touzhu
action=request("action")
select case action
case "edit"
For Each Element In Request.Form
    if InStr(Element,"T1")>0 then
       touzhu=Request.Form(Element)(1)&amp;","
    end if
Next
response.write touzhu
end select%>
</body>
</html>

回复列表 (共1个回复)

沙发

这样怎么行,应该把数据 12345 写在表单里吧

我来回复

您尚未登录,请登录后再回复。点此登录或注册