0
使用表单内的复选框,如下所示。实现复选框返回值
<form action="" method="get">
<p>
<input type="checkbox" id="blunch" />
<label for="blunch">Burrito Lunch</label>
</p>
<p>
<input type="checkbox" id="trip" />
<label for="trip">Ski Trip</label>
</p>
<p>
<input type="checkbox" id="dance" />
<label for="dance">Snowball Dance</label>
</p>
<button class="btn btn-primary btn-lg waves-effect waves-light" id="submit" type="submit">Submit</button>
</form>
当我尝试一下当复选框被选中的输出是什么,它只是显示为一个问号。有没有办法找出结果是什么名字?
这是很清楚你所要求的。 “结果名称”是什么意思?复选框只能有布尔型“checked”属性。 –
我的意思是如果方法得到,它会在栏中显示什么? @YeldarKurmangaliyev –
因为现在它从 file:/// C:/Users/Abhi/Documents/material-design-template/www/index.html 到 file:/// C:/ Users/Abhi /文件/材料设计模板/网络/ index.html的? –