changeinfo.jsp~12~
资源名称:bangong.rar [点击查看]
上传用户:dlqqsh
上传日期:2021-11-13
资源大小:7840k
文件大小:2k
源码类别:
OA系统
开发平台:
Java
- <%@ page contentType="text/html; charset=GBK" import="java.util.*,java.sql.*,java.lang.*,officeol.mc.tools.*" %>
- <%request.setCharacterEncoding("gbk"); %>
- <jsp:useBean id="sql" scope="page" class="control.sqlcontrol" />
- <html>
- <head>
- <title>
- viewinfo_do
- </title>
- </head>
- <body bgcolor="#ffffff">
- <div align="center">
- <%
- try{
- sql.getSQL2005conn("dbconfig.xml");
- String id = request.getParameter("id");
- ResultSet rs = sql.getStatement("select * from perinfo where id="+id+";");rs.next();
- Calendar c = new GregorianCalendar();
- java.sql.Date da = new java.sql.Date(c.getTimeInMillis());
- %>
- <form action="changeinfo_do.jsp" method="POST" name="myform">
- <table cellpadding="0" cellspacing="0" border="1">
- <tr>
- <td height="25px"><input type="text" name="time1" value="<%=da.toString()%>" onFocus="calendar();" /></td>
- </tr>
- <tr>
- <td height="25px"><input type="text" onfocus="makeempty()" onblur="makefull()" value="<%=rs.getString("title")%>" name="title" lang="50"></td>
- </tr>
- <tr>
- <td><textarea cols="80" rows="8" name="context" onfocus="makeempty1()" onblur="makefull1()"><%=rs.getString("context") %></textarea></td>
- </tr>
- <tr>
- <td align="center"><input type="submit" value="保存" /> <input type="reset" value="重置" /></td>
- </tr>
- </table>
- <input type="hidden" value="<%=id%>" name="id" />
- </form>
- </div>
- <%rs.close();
- sql.closeDB();
- }catch(Exception ex){
- }
- %>
- <script type="text/javascript">
- function makeempty1(){
- if(document.myform.context.value=='在此处输入具体内容(不超过200字)'){
- document.myform.context.value='';
- }
- }
- function makefull1(){
- if(document.myform.context.value==''){
- document.myform.context.value='在此处输入具体内容(不超过200字)';
- }
- }
- function makeempty(){
- if(document.myform.title.value=='输入备忘名称'){
- document.myform.title.value='';
- }
- }
- function makefull(){
- if(document.myform.title.value==''){
- document.myform.title.value='输入备忘名称';
- }
- }
- </script>
- </body>
- </html>