form表单类标签汇总

时间:2023-12-29 18:15:32

<form action="form_action.asp" method="get">
First name: <input type="text" id="fname" name="fname" placeholder="Bill">
password: <input type="password" name="lname" value="Gate">
<input type="submit" value="Submit">
<button type="button" onclick="msg()">Click me</button>
<input type="button" value="clink me" onclick="msg()">
<input type="checkbox" name="vehicle" value="bike">I have a bike
<input type="checkbox" name="vehicle" value="car">I have a car
<input type="radio" name="sex" value="male">male
<input type="radio" name="sex" value="female">female
<input type="reset" value="重置一下">
<input type="file">
<input type="hidden" name="country" value="Norway" />
<input type="image" src="./nopic.gif" alt="submit" />
<textarea rows="2" cols="10">在w3school,你可以找到你所需要</textarea>
<select>
<optgroup label="Swedish Cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
</optgroup>
<optgroup label="German Cars">
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</optgroup>
</select>
<fieldset>
<legend>健康信息</legend>
身高:<input type="text" />
体重:<input type="text" />
</fieldset>
<input list="cars" />
<datalist id="cars">
<option value="BMW">
<option value="Ford">
<option value="Volvo">
</datalist>

</form>