日期:2014-05-16  浏览次数:20329 次

JSP表单应用实例

<html>
<head><title>表单应用</title></head>
<body>
<form action="" method="post" enctype="multipart/form-data" name="form1">
<table width="410" border="1" align="center" bgcolor="#9AD3A4" bordercolor=#385610>
    <tr>
      <td colspan="2" align=center>会员注册</td>
    </tr>
    <tr>
      <td width="90" align="right">用户名:</td>
      <td width="320"><input type="text" name="userid"></td>
    </tr>
    <tr>
      <td align="right">密码:</td>
      <td><input type="password" name="pass"></td>
    </tr>
    <tr>
      <td align="right">确认密码:</td>
      <td><input type="password" name="pass2"></td>
    </tr>
    <tr>
      <td align="right">性别:</td>
      <td>
        <input type="radio" name="gender" value="male">男
        <input type="radio" name="gender" value="female">女
      </td>
    </tr>
    <tr>
      <td align="right">爱好:</td>
      <td><input type="checkbox" name="checkbox" value="001">体育
        <input type="checkbox" name="checkbox2" value="002"> 音乐
        <input type="checkbox" name="checkbox3" value="003"> 文学
        <input type="checkbox" name="checkbox4" value="004"> 其它</td>
    </tr>
    <tr>
      <td align="right">所在城市:</td>
      <td><select name="select">
        <option value="01">北京</option>
        <option value="02">上海</option>
        <option value="03">天津</option>
        <option value="04">重庆</option>
      </select></td>
    </tr>
    <tr>
      <td align="right">照片:</td>
      <td><input type="file" name="photo" ></td>
    </tr>
    <tr>
      <td align="right">备注:</td>
      <td><textarea name="textfield" rows="3"></textarea></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
   &