⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addform.asp

📁 与asp相关的技术 如数据库和网页设计 很有用的哦
💻 ASP
字号:
<%option explicit%>
<%
if session("user_type")<>"T" then
	response.redirect "../../../index.asp"
end if
%>
<html>
<head>
	<title>bbs论坛</title>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
	<link href="general.css" rel="stylesheet" type="text/css">
	<script language="JAVASCRIPT">
		<!--
		function Trim(str){
		  while (str !="" && str.charAt(0) == " ") str = str.substring(1,str.length);
		  while (str !="" && str.charAt(str.length-1) == " ") str = str.substring(0,str.length-1);
		  return str;
		}
		function check_Null(){
			if (Trim(document.form1.title.value)==""){
				alert("主题不能为空!");
				return false;
			}
			if (Trim(document.form1.user_id.value)==""){
				alert("用户名不能为空!");
				return false;
			}
			return true;
		}
		// -->
	</script>
</head>

<body>
	<h4 align="center">发表文章</h4>
	<table border="1" width="708" bordercolorlight="#80BFFF" cellspacing="0" cellpadding="0" bordercolordark="#80BFFF" align="center" >
		<tr class="trtitle">
			<td width="100%">
				<a href="bbslist.asp"><font color="#FFFFFF">【返回论坛】</font></a>
			</td>   
		</tr>   
	</table>

	<table border="1" width="708" height="400" bordercolorlight="#80BFFF" cellspacing="0" cellpadding="2" bordercolordark="#80BFFF" bgcolor="#FFFFFF"  align="center"> 
		<tr> 
			<td width="100%" valign="top" align="center"> 
				<br><br>
				<form action="add.asp" method="post" name="form1" onsubmit="javascript: return check_Null();">
				<table border="0" width="86%" cellspacing="0" cellpadding="0" class="s2" align="center">
					<tr>                                        
						<td width="20%">文章主题:</td>
						<td><input type="text" name="title" size="49" class="inputbox"></td>
					</tr>
					<tr>
						<td width="20%">文章内容:</td>
						<td><textarea rows="10" name="body" cols="60" class="inputtext"></textarea> </td>
					</tr>
					<tr>                                        
						<td width="20%">用户名:</td>
						<td><input type="text" name="user_id" size="20" class="inputbox" value="<%=Session("user_id")%>"></td>               
					</tr>
					<tr>                                        
						<td width="20%">email:</td>
						<td><input type="text" name="email" size="30" class="inputbox" value="<%=session("email")%>"></td>
					</tr>
					<tr>
						<td colspan="2"  align="center">
							<br>
							<input type="submit" value="确定提交" name="B1" class="inputbutton">&nbsp; 
							<input type="button" value="返回论坛" name="返回论坛" onclick="javascript:history.back();" class="inputbutton">
						</td>
					</tr>
				</table>
				</form>    
			</td>  
		</tr>  
	</table>  

	<table border="1" width="708" bordercolorlight="#80BFFF" cellspacing="0" cellpadding="0" bordercolordark="#80BFFF" align="center" >
		<tr class="trtitle">
			<td width="100%">
				<a href="bbslist.asp"><font color="#FFFFFF">【返回论坛】</font></a>
			</td>   
		</tr>   
	</table>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -