两个textarea输入多行,获取值问题
两个textarea,我想第一个textarea输入多行后,response.write后得出值为insert into "textarea1"内容,第二个textarea输入多行后,response.write后得出值为values "textarea2"举例吧
content1输入的内容为:
aaa
bbb
content2输入的内容为:
111
222
得到的值为
insert into aaa values 111;
insert into bbb values 222;
我现在写了一小半,不过不知道后面的应该再怎么写了?谁能帮俺完成一下,先谢啦!
源文件:
<%
if request.QueryString("active") = "sumbit" then
content1 = Request("content1")
content2 = Request("content2")
dim strline(100),i
i=0
do while instr(content1,chr(13))>0 and i<=100
if content1 <> "" then
no=instr(content1,chr(13))
strline(i)=left(content1,no)
strline(i)="insert into " + strline(i)
content1=mid(content1,no)
response.Write(content1)
response.Write(i&"<br>")
end if
i=i+1
loop
response.End()
if content1 <> "" then
content1=content1+"insert into"
end if
insert = "insert into " & content1 & " values " & content2
response.Write(insert)
response.End()
end if
%>
<html>
<head>
<title>aaa</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="?active=sumbit">
<p>insert into <br />
<textarea name="content1" rows="5"></textarea>
<br />
values<br />
<textarea name="content2" rows="5"></textarea>
</p>
<p>
<input type="submit" name="Submit" value="提交" />
</p>
</form>
</body>
</html>