简单form表单

1.第一种:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"

    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
    <div>
    <!--创建表单  -->
       
<form>
          <fieldset>
          <!--表单功能进行描述  -->
          <legend>Add a product</legend>
          <!--表单名名称进行填写  -->
          <p>
           <lable for="name">Product name:</lable>
           <input type="text" id="name" name="name">
          </p>
          <!-- 表单详情填写 -->
          <p>
          <lable for="description">description:</lable>
          <input type="text" id="description" name="description">
          </p>
          <!-- 表单价格进行填写 -->
          <p>
          <lable for="price:">price:</lable>
          <input type="text" id="price" name="price">
          </p>
          <!-- 提交与重置 -->
          <p id="buttons">
              <input id="reset" type="reset"/>
              <input id="submit" type="submit"/>
          </p>
          </fieldset>
       </form>

    </div>
</body>
</html>


2.第二种形式

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
    <div>
    <!--创建表单  -->
       
<form action="saved">
          <fieldset>
          <!--表单功能进行描述  -->
          <legend>Add a product</legend>
          <!--表单名名称进行填写  -->
          <table>
          <tr>
           <td><lable for="name">Product name:</lable></td>
            <td><input type="text" id="name" name="name"></td>
          </tr>
          <!-- 表单详情填写 -->
          <tr>
          <td><lable for="description">description:</lable></td>
          <td><input type="text" id="description" name="description"></td>
          </tr><br/>
          <!-- 表单价格进行填写 -->
          <tr>
          <td><lable for="price:">price:</lable></td>
          <td><input type="text" id="price" name="price"></td>
          </tr><br/>
          <!-- 提交与重置 -->
          <tr id="buttons">
              <td><input id="reset" type="reset"/></td>
              <td><input id="submit" type="submit"/></td>
          </tr><br/>
          </table>
          </fieldset>
       </form>

    </div>
</body>
</html>


猜你喜欢

转载自blog.csdn.net/qq_32067151/article/details/80071007