?? bulletin_add.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="error.jsp" %><%@ include file="initialization.jsp" %><% String title=request.getParameter("title");String promulgator=request.getParameter("promulgator");String content=request.getParameter("content");String requestPage=request.getParameter("request");String thisPage=application.getRealPath(request.getRequestURI());//out.println(requestPage);//out.println(thisPage);if(requestPage!=null&&thisPage.equals(requestPage)) //如果請求頁面非空{ //out.print("<script language='JavaScript'>alert('本頁面請求!');</script>"); if(!title.equals("")&&!promulgator.equals("")&&!content.equals("")) { String stat="insert into bulletin(title,content,promulgateDate,promulgator)" + " values('"+title+"','"+content+"'," +"'"+dateTime.getDate()+"'"+",'"+promulgator+"');"; mysql.executeStatement(stat); } else { out.print("<script language='JavaScript'>alert('輸入數據錯誤,請重新輸入!');</script>"); }} %><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>無標題文檔</title></head><body><table width="550" height="455" border="0" cellspacing="0" cellpadding="0" style="font-size:13px"> <tr> <td height="455"> <form id="form1" name="form1" method="post" action=""> <table width="550" border="0" cellspacing="0" cellpadding="0" style="font-size:13px"> <tr> <td width="69" height="27" align="right">標 題:</td> <td width="522"><input name="title" type="text" id="title" size="50" maxlength="50" /></td> </tr> <tr> <td height="25" align="right"> 發布者:</td> <td><input name="promulgator" type="text" id="promulgator" value="圖書館" maxlength="50" /> <input name="request" type="hidden" id="request" value=<%="\""+thisPage+"\""%>></td> </tr> <tr> <td height="26" colspan="2" align="center">內 容</td> </tr> <tr> <td height="57" colspan="2" align="center" valign="top"> <textarea name="content" cols="70" rows="28" id="content"></textarea> </td> </tr> <tr> <td height="27" colspan="2" align="right"><input type="submit" name="Submit" value="提交" /> <input type="reset" name="Submit2" value="重置" /> </td> </tr> </table> </form> </td> </tr></table></body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -