日期:2014-05-16 浏览次数:20495 次
dim querystr:querystr=request.querystring dim arr if querystr<>"" arr=split(querystr,"|")'不小心注释搞错 end if
------解决方案--------------------
将以下代码 存为 test.asp
注意文件名 否则要改对应 提交目标名
我已经测试正确 你千万不要说你不会测试啊 我会晕死的
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<script>var p;
p="abc|123|bc6|uyyu";
</script>
<form action="test.asp" method="post" name="form1">
<script>document.write("<input type=text name=T1 size=20 value="+p+">")</script>
<input type="submit" name="submit" value="提交" >
</form>
<%
p1=request.form("T1")
i=0
if request.form("submit")="提交" then
 if p1="" then
 response.Write "你没提交的p值"
 else
 response.Write "你提交的p值:" & p1 & "<br>"
 arKeyword = Split(Trim(p1), "|")
            For Each sKeyword In arKeyword
                response.Write "p["& i &"]="& sKeyword &"<br/>"
                i=i+1
            Next
 end if
end if 
%>
</body>
</html>