wenzhangfabu.jsp

来自「jsp做的一个个人网站」· JSP 代码 · 共 61 行

JSP
61
字号
<%@ page contentType="text/html;charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%if(session.getAttribute("flag")!="1"&&session.getAttribute("flag1")!="2")
out.print("<script>alert('您未登录请登录再发表文章!');location.href='index.jsp';</script>");%>
<%@  include file="yeshou.txt"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>文章发表</title>


</head>
<script>
function check()
{
	if (form1.title.value=="")
	{
		alert("文章标题不能为空!");
		return false;
		
	}
	if (form1.ct.value=="")
	{
		alert("内容不能为空!");
		return false;
	}
	if(form1.nicheng.value=="")
	{
	alert("昵称不能为空!")
	return false;
	}
	return true;
}
</script>
<style type="text/css">
body {
	background-color:#99CCCC
}
td{ border:0px #CCCCCC dashed;}
table{ border:0px;}
</style>
<body>
<table align="center"  background="#99CCCC" width="780" >
<form id="form1" name="form1" method="post" action="wenzhangstore.jsp" onSubmit="return check()">
  <p>文章标题:
    <input type="text" name="title" />
  </p>
  
  <p>文章内容:
    <textarea name="ct" cols="109" rows="15"></textarea>
  </p>
  <p>
    <input type="submit" name="Submit" value="发表" />
    <input type="reset" name="Submit2" value="取消" />
  </p>
  <p>&nbsp;</p>
</form><a href="zhongshuofenyun.jsp">返回</a>
</table>

</body>
</html>

⌨️ 快捷键说明

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