真的没有高手能帮我吗?
其实问题很简单,但我刚开始学ASP。
<% Application("filebase") = Server.MapPath("files") & "\" %>
<html>
<head>
<title>淮南市地税局聊天室</title>
<script language="JavaScript">
function verify(form){
if(form.Name.value == ""){
alert("请输入您的姓名!");
}else{
}
</script>
</head>
<body Bgcolor="#476895" TEXT=#f0f0f0>
<%=Request.QueryString("ErrorMessage")%>
<BR>
<center>
<CENTER>
<p><font size="7" color="#FF0000">淮南市地税局聊天室 </font></p>
<p><font size="3" color="#FFFFFF">试用版</font> </p>
<br>
<font face="Trebuchet MS, ms sans serif, Verdana,Arial" size=2 color=#f0f0f0><b>请输入您的姓名进入下面的聊天室!</b>
</center>
<BR>
<BR> <center>
<center>
<form name="form_topics" action="chatroom.asp" method="post" onSubmit="verify(this)">
<table>
<tr>
<td>
<font face="Trebuchet MS, ms sans serif, Verdana,Arial" size=2 color=#f0f0f0>Name:
</td>
<td>
<%
If Not IsNull(Session("Name")) Then
Response.Write "<input type='text' name='Name' value='" & Session("Name") & "' maxlength=12 maxsize=12>"
Else
Response.Write "<input type='text' name='Name' maxlength=12 maxsize=12>"
End If
%>
</td>
</tr><tr>
<td>
<font size=2 face=verdana color=#f0f0f0>Room:
</td>
<td>
<select name="Topic">
<%
Topics = Application("TopicNames")
If IsArray(Topics) Then
For I=1 To UBound(Topics)
Name = Topics(I)
Response.Write "<option value='" & Name & "'>" & Name
Next
End If
%>
</select>
</td>
</tr><tr>
<td colspan=2 align=right>
<div align="center"><br>
<input type="image" src="images/logon.gif" border=0>
</div>
</td>
</tr>
</table>
</form>
</center>
</body>
</html>
执行时,若name输入为空,弹出提示输入姓名窗口,确定后,立刻又弹出上一个连接到本窗口的窗口,如何解决?好象就是调用函数verify(this)的问题?
各位大哥帮帮忙。