使用数组或值进行复选框检查
html代码:
<div id="weekdays">
<label for="saturday"> Saturday </label><input type='checkbox' name='week_day[]' value='saturday' id="saturday">
<label for="sunday"> Sunday </label><input type='checkbox' name='week_day[]' value='sunday' id="sunday">
<label for="monday"> Monday </label><input type='checkbox' name='week_day[]' value='monday' id="monday">
<label for="tuesday"> Tuesday </label><input type='checkbox' name='week_day[]' value='tuesday' id="tuesday">
<label for="wednesday"> Wednesday </label><input type='checkbox' name='week_day[]' value='wednesday' id="wednesday">
<label for="thursday"> Thursday </label><input type='checkbox' name='week_day[]' value='thursday' id="thursday">
<label for="friday"> Friday </label><input type='checkbox' name='week_day[]' value='friday' id="friday">
大批
var f = ["saturday", "sunday", "monday"]
信息 我想在这个表格上查看周六、周日和周一的日期