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

📄 add.jsp

📁 本系统采用jsp编写,数据库采用的是MYSQL,使用JDBC驱动
💻 JSP
字号:
<%
/**
********************************
*          NTsky留言本V 1.0           *
*          功能:添加留言
*          代码编写:姚君林
*          编写日期:2003/4/5
*	   代码修改:
           修改日期:			
********************************
*/
%>

<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新技术天地</title>
<link rel="stylesheet" href="text.css" type="text/css">
<SCRIPT Language=javascript>
<!--
function CheckData()
{
		
	if (text.username.value == "") 
	{   //检查是否完成姓名输入	
		window.alert("请输入姓名");
	}
	else if(text.title.value == "")
	{   	
		window.alert("请留言主题不能为空");
	}
	else if(text.text.value == "")		
	{  
		window.alert("不能是空留言!");
	}
	else //通过所有检查	
		text.submit(); //送出表单中的数据
}
-->
</SCRIPT>

</head>

<body leftMargin=0  topMargin=0 marginheight="0" marginwidth="0" bgcolor="#ffffff">
<br>
<div align="center">
  <center>
  <table align=center border=0 cellPadding=0 cellSpacing=0 width=500>
    <tr>
      <td width=134 height=37><IMG height=37 src="images/top_left.gif" width=134></td>
      <td width="100%" background=images/top_middle.gif height=37 valign="middle">
      <p align="center"><font color="#FFFFFF">欢迎来到新技术天地!!!</font></td>
      <td width=49 height=37><IMG height=37 src="images/top_right.gif" width=49></td>
    </tr>
  </table>
  </center>
</div>
<div align=center>
  <center>
  <table align=center border=0 cellPadding=0 cellSpacing=0 width=500 height=113>
    <tr>
      <td width=11 background="images/middle_left.gif" height=113> </td>
      <td width=478 align="center" height=1>
  <br>
  <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#009933" width="94%" id="AutoNumber3" height="126">
    <tr>
      <td width="100%" height="126" align="center" valign="top">
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#009933" width="100%" id="AutoNumber4" height="28">
        <tr>
          <td width="100%" height="28" background="images/note_bg.gif">
          <p align="center">欢迎留言!(“<font color="#FF0000">*</font>”是必填写的字段)</td>
        </tr>
      </table>
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber5" height="243" bgcolor="#F7FEF6">
        <form name="text" method="post" action="load.jsp">               
        <tr>
          <td width="100%" height="88" valign="top">
          <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber6" height="87">
            <tr>
              <td width="15%" height="29"><font color="#99BB99"> </font><font color="#FF0000">*</font><font color="#99BB99"> 
              姓名:</font></td>
              <td width="37%" height="29"> <input type="text" name="username" size="16" class=yao  onMouseMove=this.focus()></td>
              <td width="14%" height="29">
              <p align="center"><font color="#99BB99">性别:</font></td>
              <td width="34%" height="29"> <input type="radio" value="男" name="sex" checked><font color="#99BB99">男 </font> <input type="radio" value="女" name="sex"><font color="#99BB99">女</font></td>
            </tr>
            <tr>
              <td width="15%" height="29">
              <p align="center"><font color="#99BB99">E-mail</font></td>
              <td width="37%" height="29"> <input type="text" name="email" size="20" class="yao"></td>
              <td width="14%" height="29">
              <p align="center"><font color="#99BB99">QQ</font></td>
              <td width="34%" height="29"> <input type="text" name="qq" size=16 class="yao"></td>
            </tr>
            <tr>
              <td width="14%" height="29">
                <font color="#99BB99">主页:</font></td>
              <td width="86%" height="29" colspan="3">
               <input type="text" name="url" size="22" class="yao">     <font color="#99BB99">注意</font><font color="#FF0000">*</font><font color="#99BB99">为必填字段</font></td>
              </tr>
          </table>
          </td>
        </tr>
        <tr>
          <td width="100%" height="155" valign="top">
         
          <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber7" height="167">
            <tr>
              <td width="29%" height="22">
              <p align="right"><font color="#FF0000">*</font><font color="#99BB99">留言标题: </font></td>
              <td width="71%" height="165" rowspan="3">
              <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber8" height="175">
                <tr>
                  <td width="100%" height="22"><font color="#99BB99"> <input type="text" name="title" size="28" class=yao onMouseMove=this.focus() maxlength="28"></font></td>
                </tr>
                <tr>
                  <td width="100%" height="125" valign="top"> <!--webbot bot="Validation" I-Maximum-Length="200" --><textarea name="text" cols="40" rows="8" class="yao" onMouseMove=this.focus()></textarea></td>
                </tr>
                <tr>
                  <td width="100%" height="28" valign="center">     <input type="button" value="提交" OnClick='CheckData()'>  <input type="reset" value="重写"></td>
                </tr>
              </table>
              </td>
            </tr>
            <tr>
              <td width="29%" height="22">
              <p align="right"><font color="#FF0000">*</font><font color="#99BB99">留言内容:</font></td>
              </tr>
            <tr>
              <td width="29%" height="123" align="center" valign="top">
                <script language=JavaScript>
                 function changeimage()
 					{ 
  						document.showimages.src=document.text.image.value;
 					}
                            </script>
                            <img name=showimages src="images/image/01.gif" width="84" height="95">
					
                            <select style="position: absolute; left: 188; top: 328; width: 85px; height: 20px;  clip:rect(2 114 20 2)"  name="image" size="1" onChange="changeimage();" >
                              <option value="images/image/01.gif" selected>images 1</option><img src=""> 
                              <option value="images/image/02.gif">images 2</option>
                              <option value="images/image/03.gif">images 3</option>
                              <option value="images/image/04.gif">images 4</option>
                              <option value="images/image/05.gif">images 5</option>
                              <option value="images/image/06.gif">images 6</option>
                              <option value="images/image/07.gif">images 7</option>
                              <option value="images/image/08.gif">images 8</option>
                              <option value="images/image/09.gif">images 9</option>
                              <option value="images/image/10.gif">images 10</option>
                              <option value="images/image/11.gif">images 11</option>
                              <option value="images/image/12.gif">images 12</option>
                              <option value="images/image/13.gif">images 13</option>
                              <option value="images/image/14.gif">images 14</option>
                              <option value="images/image/15.gif">images 15</option>
                              <option value="images/image/16.gif">images 16</option>
                              <option value="images/image/17.gif">images 17</option>
                              <option value="images/image/18.gif">images 18</option>
                              <option value="images/image/19.gif">images 19</option>
                              <option value="images/image/20.gif">images 20</option>
                              <option value="images/image/21.gif">images 21</option>
                            </select>
							</td>
				     </td>
              </tr>
          </table>
          </td>
        </tr>
      </table>
      </td>
    </tr>
    </form>
  </table>
  <p><br>
 
 
  </td>
      <td width=11 background="images/middle_left.gif" height=113> </td>
    </tr>
    </table>
  </center>
</div>
<div align=center>
  <center>
  <table border=0 cellpadding=0 cellspacing=0 width=500>
    <tr>
    <td width=133 height=72><IMG height=72 src="images/bottom_left.gif" width=133></td>
    <TD width="100%" background=images/bottom_middle.gif height=72>
    <font color="#FFFFFF">All Rights Reserved.Copyleft &copy; 2001-2003 
    <a href="http://www.ntsky.com"><font color="#FFFFFF">www.NTsky.com</font></a></font><a href="http://www.ntsky.com"><font color="#FFFFFF">
    </font></a> </TD>
    <td width=22 height=72><IMG height=72 src="images/bottom_right.gif" width=22></td>
    </tr>
  </table>
  </center>
</div>
</body>
</html>

⌨️ 快捷键说明

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