📄 newcreate.asp
字号:
<%@ LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--声明HTML语言的版本信息等-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<%
'使用enter.asp页面定义的session变量判断用户是否已经登录成功
if session("login")="ok" then
'如果enter.asp页面使用GET方法链接该页面的,就用Request的QueryString方法取得从enter.asp页面传递过来的user参数
if Request.ServerVariables ("REQUEST_METHOD")="GET" then
UserID=Request.QueryString ("user")
end if
%>
<script language="jscript">
<!--
//控制页面中的新房间名和话题输入文本框不能为空
function Check()
{
var NotNull
NotNull=true
if (document.room.newroomname.value =="")
{
window.alert("请输入新房间名!")
NotNull=false
}
if (document.room.topic.value =="")
{
window.alert("请输入聊天室话题!")
NotNull=false
}
return NotNull
}
//-->
</script>
<!--以下是页面中看到的表单中内容设计部分-->
<form name="room" action="main.asp" method="post" onsubmit="return Check()">
<table width="317" height="151" border="5" align="center" cellpadding="5" cellspacing="5">
<tr>
<td height="18" colspan="2"><div align="center"><b><font color="#000000" face="楷体_GB2312">新建聊天室</font></b></div></td>
</tr>
<tr>
<td width="31%"><p align="center"><b><font color="#000000" face="楷体_GB2312">房间名</font></b></p></td>
<td width="69%" height="18"><p align="center"><b>
<!--页面中填写新房间名的输入文本框-->
<input name="newroomname" type="text" id="newroomname" maxlength="20">
</b></p></td>
</tr>
<tr>
<td width="31%" height="9"><p align="center"><b><font color="#000000" face="楷体_GB2312">话题</font></b></p></td>
<td width="69%" height="9"><p align="center">
<!--页面中填写话题的输入文本框-->
<input name="topic" type="text" id="topic" maxlength="20">
</p></td>
</tr>
<tr>
<td height="9" colspan="2"><table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<!--提交按钮-->
<input type="submit" value="提交">
</div></td>
<td><div align="center"></div></td>
<td><div align="center">
<!--重置按钮-->
<input type="reset" value="重置">
</div></td>
</tr>
</table></td>
</tr>
</table>
<!--表单中的隐藏域标记,用来向main.asp页面传递参数-->
<input type="hidden" name="user" value=<% =UserID %> >
</form>
<%
end if'与if session("login")="ok" then语句相对应
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -