<tr>
<td><div align="right" class="hei12pxsong">
<div align="right">
<div align="right">验证码:<font color="#FF0000">&nbsp;*&nbsp;</font></div>
</div>
</div></td>
<td><input name="mofei" type="text"> <%=getcode1()%></td> '这里开始调用
<td><div align="left" class="hei12pxsong">请输入验证码</div></td>
</tr>
<tr>
<td height="45" colspan="3"><div align="center">
<input type="submit" name="Submit" value="同意以下条款,提交注册信息" />
</div></td>
</tr>
</table>
<input type="text" name="xxoo" value="<%=Session("GetCode")%>" /> '我在这取值
</form>
<%
'------------------------------------------------验证码使用函数-----------------------------------------
Function getcode1()
Dim test
On Error Resume Next
Set test=Server.CreateObject("Adodb.Stream")
Set test=Nothing
If Err Then
Dim zNum
Randomize timer
zNum = cint(8999*Rnd+1000)
Session("GetCode") = zNum
getcode1= Session("GetCode")
Else
getcode1= "<img src=""getcode.asp"">"
End If
End Function
'-------------------------------------------------------------------------------------------------------
%>