html性别框代码怎么写?

html-css08

html性别框代码怎么写?,第1张

第一种下拉框:

<select>

<option>男</option>

<option>女</option>

</select>

第二种单选框:

<input type="radio" name="sex" value="男">男

<input type="radio" name="sex" value="女">女

实现效果如图

1.单行文本框:

<input type="text" style="height:20pxwidth:100px" />

2.多行文本框(文本域):

<textarea style="width:300pxheight:100px"></textarea>

文本框是单行的,而文本域可以输入多行,不过文本框也可以通过设置变成成多行。一般来说如果要填写的内容很多我们就用文本域<textarea>,反之用<text>。