这是我表单的一小部分。设置用户可以添加关于一个或多个的信息。因此,使用数组输入框,复选框和选择选项框。
oranges = cm.ScalarMappable(cmap=plt.cm.Oranges)
blues = cm.ScalarMappable(cmap=plt.cm.Blues)
RN1 = {}
for i in range(100):
for j in range(100):
RN1[(i / 100.0, j / 100.0)] = (np.random.uniform(0, 400), np.random.uniform(0, 400))
R_0s = RN1.values()
R_01s = np.array([k[0] / 400.0 for k in R_0s])
R_02s = np.array([k[1] / 400.0 for k in R_0s])
x = [k[0] for k in RN1.keys()]
y = [k[1] for k in RN1.keys()]
oranges.set_array(R_01s)
blues.set_array(R_02s)
s1 = plt.scatter(x, y, c=R_01s, marker='s', cmap=plt.cm.Oranges)
s2 = plt.scatter(x, y, c=R_02s, marker='s', cmap=plt.cm.Blues)
plt.colorbar(oranges)
plt.colorbar(blues)
我遇到的问题是“分类”的选择选项。
当我使用<fieldset class="row1">
<H2>Munro Details</H2>
<table id="munroTable" class="form" border="0">
<tbody>
<tr>
<td><input type="checkbox" required="required" name="chk[]" checked="checked" /></td>
<td>
<label>Name</label>
<input class = "textbox" type="text" maxlength = "30" required="required" name="name[]">
</td>
<td>
<label>Height (metres)</label>
<input class = "textbox" type="number" maxlength = "5" required="required" name="height[]">
</td>
<td>
<label>Classification</label>
<select name = "classification[]">
<optgroup label="Scottish Hills">
<option value="Munro">Munro</option>
<option value="Corbett">Corbett</option>
<option value="Graham">Graham</option>
<option value="Donald">Donald</option>
</optgroup>
<optgroup label="Non Scottish Hills">
<option value="Furth">Furth</option>
<option value="Hewitt">Hewitt</option>
<option value="Wainwright">Wainwright</option>
<option value="Brikett">Brikett</option>
</optgroup>
<optgroup label="UK wide">
<option value="Marilyn">Marilyn</option>
</optgroup>
</select>
</td>
<td>
<label>Topped?</label>
<input type="checkbox" value = "Yes" name="topped[]" checked="checked">
</td>
</tr>
</tbody>
</table>
<p>
<input class = "myButton" type="button" value="Add Munro" onClick="addRow('munroTable')" />
<input class = "myButton" type="button" value="Remove Munro" onClick="deleteRow('munroTable')" />
</p>
</fieldset>
时,看看哪些数据成功发送,分类就不会显示出来。
我认为它很简单,但我找不到它。
感谢您花时间去看。