我有一个代码,它会在页面加载时禁用该按钮,因为下拉列表的值为空。但是,当选择一个值(值来自数据库,它被填充并且它正在工作)时,该按钮仍然被禁用。
Jquery的:
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12">Select Kagawad</label>
<div class="col-md-9 col-sm-9 col-xs-12">
<?php
include 'config.php';
$selectSql = "SELECT firstName, middleName, lastName
FROM table_position p
LEFT JOIN person r ON p.Person_idPerson = r.idPerson
WHERE p.bar_position = 'Barangay Kagawad' AND p.activeOrInactive = 'Active'";
$result = mysqli_query($conn, $selectSql);
?>
<select class="form-control" id = "kagawad" name = "kagawad" required>
<option value="">Choose...</option>
<?php
while ($line = mysqli_fetch_array($result)) {
?>
<option value="<?php echo $line['firstName'].' '.$line['middleName'].' '.$line['lastName'];?>"> <?php echo $line['firstName'].' '.$line['middleName'].' '.$line['lastName'];?> </option>
<?php
mysqli_close($conn);
}
?>
</select>
</div>
<button id="send" type="submit" class="send btn btn-success" name="addCedula">Save Record</button>
HTML:
{{1}}
我该怎么办?修改代码需要什么?谢谢!
答案 0 :(得分:5)
T == char32_t
上使用char32_t
个活动。change
来设置禁用状态,而不是<select>
。<强>代码:强>
attr()