HTML表单

<!DOCTYPE HTML>
<html>
<head>
<title>表单</title>
<meta charset="utf-8">
</head>
<body>
<form method="post" action="http://localhost:8080/form" target="_blank" >
<input type="hidden" name="record ID" value="1234"
<p>
<label for="name">
Name:<input placeholder="Your name" maxlength="10" id="name" name="name">
</label>
</p>
<p>
<label for="city">
City:<input placeholder="Where you live" size="10" id="city" name="city">
</label>
</p>
<p>
<label for="fave">
Fruit:<input  list="fruitlist" size="10" maxlength="10" id="fave" name="fave">
</label>
</p>
<p>
<label for="color">
Color:<input type="color" id="color" name="color">
</label>
</p>
<p>
<label for="search">
Search:<input type="search" id="search" name="search">
</label>
</p>
<p>
<label for="fave" style="vertical-align:top">
Favorite Fruit:
<select id="fave" name="fave"  multiple>
                    <option value="apples" selected label="Apples">Apples</option>
                    <option value="oranges" label="Oranges">Oranges</option>
                    <option value="cherries" label="Cherries">Cherries</option>
                    <option value="pears" label="Pears">Pears</option>
                    <option>aaa</option>
                    <option>vbbbbbb</option>
<select/>
</label>
</p>
<p>
<textarea cols="20" rows="5" wrap="hard" id="story" name="story">Tell us why this is your favorite fruit</textarea>
</p>
<button type="submit">Submit</button>
<input type="file" name="filedata">
</form>
<!--计算器-->
<form οnsubmit="return false" οninput="res.value=quant.valueAsNumber+price.valueAsNumber">
<fieldset>
<legend>Price Calculator</legend>
<input type="number" placeholder="质量" id="quant"> +
<input type="number" placeholder="价格" id="price"> =
<output for="quant name" name="res"/>
    </fieldset>
</form>
<datalist id="fruitlist" multiple>
<option value="Apples" label="Lovely Apples"/>
<option value="Oranges">Refreshing Oranges</option>
<option value="Cherries"/>
</datalist>
</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值