我得的一个asp.情的大家指点
:
<HTML>
<head>
<meta http-equiv="Content-Type" content="text/HTML; charset=gb2312">
<title>asp_test</title>
</head>
<body>
<div align="center">
<center>
<h1><font color="#00CCFF">collect you information:</font></h1>
</center>
<hr>
<centre> <font color="#00CC99">your name <from></font></centre> </div>
<p align="center"><centre>
<input type="text" name="txst1" value="">
</centre></p>
<p align="center"><centre><font color="#99CC99">your sex </font></centre></p>
<p align="center"><font color="#99CC99"><centre>
<input type="radio" name="radio1" value="male" checked>
male </centre></font></p>
<p align="center"><font color="#99CC99"><centre>
<input type="radio" name="radio2" value="female" >
female</centre></font></p>
<p align="center"><centre> <font color="#00CC99">your adress</font></centre></p>
<p align="center"><centre>
<select name="list1" size="5">
<option selected> Beijing
<option > Guangzhou
<option > Shanghai
<option > Shenzhen
<option > Tianjing
<option > Dalian
<option > Zhuzhou
</select>
</centre></p>
<div align="center"><centre></centre></div>
<centre>
<p align="center">
<input type="submit" name="button1" value="finish">
</p>
<script language="VBScript" >
<!--
option explicit
sub radio1_onclick()
radio1.checked=true
radio2.checked=false
End sub
sub radio2_onclick()
radio2.checked=true
radio1.checked=false
End sub
sub button1_onclick()
dim coll,name , sex, adress
coll=documrnt.froms
name =coll.item(0).value
if name ="" then
MsgBox"yiou have nt input your name ."
exit sub
end if
if radio1.checked=true then
sex=radio1.value
else if radio2.checked=true then
sex=radio2.value
end if
select Case list1.selectlindex
Case 0
adress=" Beijing"
Case 1
adress="Guangzhou"
Case 2
adress=" Shanghai "
Case 3
adress="Tianjing"
Case 4
adress="Dalian"
Case 5
adress="Zhuozhuo"
End select
document.open
document.writeln"<Hmtl><tilte>your personal information.</tilte>"
document.writeln"<>Body bgcolor=#cod9d9>"
document.writeln"<h2>your personal information :</h2>"
document.writeln"<HR>"
document.writeln"<p> </p>"
document.writeln"<centre>"
document.writeln"<TABLE>"
document.writeln"<TR>"
document.writeln"<TD>"
document.writeln"<h3>your name:</h3>"
document.writeln"<h3>your sex :</h3>"
document.writeln"<h3>your adress:</h3>"
document.writeln"</TD>"
document.writeln"<TD>"
document.writeln"<h3>"&name&"</h3>"
document.writeln"<h3>"&sex&"</h3>"
document.writeln"<h3>"&adress&"</h3>"
document.writeln"</TD>"
document.writeln"</TR>"
document.writeln"<TABLE>"
document.writeln"</centre>"
document.writeln"</body>"
document.writeln"</HTML>"
document.close
End sub
-->
</script>
</centre>
</body>
</HTML>
else if 在vbscript中应该为elseif
你要问的是什么呢,报什么错呢
selectlindex
改为 selectedindex
给分!