最外层标签<Form>
收集用户输入信息,输入元素:<imput type=“文本”
借用表格table,
<from action=“”>
<td>
<lable for=“username”>用户名:<>
(lable是一个标签,其中for属性是关联的,和哪一组有关联,里面是username,和username那一组相关联)
<input type=“text” id=“username” name=“username”>
密码框 type=“password”
单选框(单选按钮)type=“radio”
复选框type=“checkbox”
<input type=“checkbox” name=“language” id=“Python”><lable for=“Python”>Python</>(想要添加文字必须要加一个标签lable)
<input type=“checkbox” name=“language” id=“C#”><lable for=“C#”>C#</>
name是一样的,属于同一组,需要几个可以添加几个,在二选一中,也是一样的,
<input type=“radio” name=“sex” id=male”><lable for=“male”>男</>
<input type=“radio” name=“sex” id="famale”><lable for=“famale”>女</>
name相同,是同一组,二选一
从本机文件里上传一个文件
type=“file”
表单(用于收集用户的输入和选择信息)












网友评论