我尝试过使用
string[] AllDays = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" };
但我想为每个值分配1,所以当点击时我可以乘以另一个值
<label for="Monday">
<input type="checkbox" name="Days" value="monday" />
Monday
</label>
<label for="Tuesday">
<input type="checkbox" name="Days" value="tuesday" />
Tuesday
</label>
<label for="Wednesday">
<input type="checkbox" name="Days" value="wednesday" />
Wednesday
</label>
<label for="Thursday">
<input type="checkbox" name="Days" value="thursday" />
Thursday
</label>
<label for="Friday">
<input type="checkbox" name="Days" value="friday" />
Friday
</label>
答案 0 :(得分:0)
使用不同的值。当你需要它时,得到值(3,对于ex),除以相同的值(3/3)给你1,然后进行乘法运算。