HTML

<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
    <form action="" method="get"> 
    用户名:  <input type = "text" name="username" value=""> <br>
    密码:       <input type = "password" name="password" value=""> <br>
    确认密码:<input type = "password" name="passwordagain" value=""> <br>

    性别:
    <label><input name="Fruit" type="radio" value="" />男 </label> 
    <label><input name="Fruit" type="radio" value="" />女 </label> 
    <br>

    职业:
    <select>    
        <option value="0"> xx </option>
        <option value="1"> xxx </option>
    </select>
    <br>

    
    个人喜好:
    <label><input name="Fruit" type="checkbox" value="" />电脑网络 </label> 
    <label><input name="Fruit" type="checkbox" value="" />影视娱乐 </label> 
    <label><input name="Fruit" type="checkbox" value="" />棋牌娱乐 </label> 
    <label><input name="Fruit" type="checkbox" value="" />读书读报 </label> 
    <label><input name="Fruit" type="checkbox" value="" />美酒佳肴 </label> 
    <label><input name="Fruit" type="checkbox" value="" />绘画书法 </label> 
    <br>
    
    个人说明:
    <textarea name="DIVCSS5" cols="30" rows="10"> 
        
    </textarea>  
    <br>
    <input type = "submit" name="" value="提交"> 
    <input type = "reset" name="DIVCSS5" value="重置"> <br>
    </form> 
</body>
</html>
View Code

checkbox,多选框,框中是正方形的。

radio,单选框,框中是圆形的。

select,下拉框

text,文本框

textare,大大的文本框

 

<input type = "text" name = "sumbit" value = "aa">

其中,如果type是"text",那么value后面的是填入的默认值。name只是提交整个form时的变量名

 

但是如果type是sumbit那些的时候,那个value就是里面的值,就是显示出来的值

 

设置一个带参数的超链接,参数不能stuName = "xxx"这样。还有里面的空格请注意,""里面多了空格是不行的,就算是算术运算符左右的空格,也是不行的。

<a href="addStudent.jsp?handType=add&stuName=anyThing">删除</a>

 

posted on 2017-12-30 20:23  stupid_one  阅读(150)  评论(1编辑  收藏  举报

导航