html表单的各种输入控件
表单的输入控件主要是input和select。其中input可以是多种类型,通过type属性来进行定义,type可以取值是text,radio,checkbox,password,submit,reset. select是和option组合使用的。后台要想获得表单的值,是通过name属性的值来获得用户的输入。 后台获取的值: input-text-name input-redio-name-value input-checkbox-name-value input-password-name input-textarea-name select-option-name-value 下面是综合应用这些组成一个注册表单。 <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <center> <h1 style="color:blue;">注册表单</h1> <hr/> <form name="reg" action="regsuccess.html" method="post"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td>用户名:</td> <td><input type="text" name