こんにちは私は次のコードを持っています。これは1つの行に対してのみ機能します。私はこれがすべての行のために動作する必要があります&また、私はトップのチェックボックスを選択した場合、テーブルのすべての項目を表示するすべてのチェックボックスを選択する必要があります。すべての項目のチェックボックス
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Quotation New Design</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<script type="text/javascript" >
function valueChanged()
{
if($(".checkezspeedkit").is(":checked"))
$(".qtyezspeedkit ").show();
else
$(".qtyezspeedkit").hide();
}
</script>
<style type="text/css">
.qtyezspeedkit {
display:none;
}
.optionezspeedkit{
display:none;
}
.qtyezspeedkitbluetooth{
display:none;
}
.optionezspeedkitbluetooth{
display:none;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-12">
<h4>Checkbox Test</h4>
<div class="table-responsive">
<table id="mytable" class="table table-bordred table-striped">
<thead>
<th><input type="checkbox" id="checkall" /></th>
<th>Name</th>
<th>Qty</th>
<th>Option</th>
</thead>
<tbody>
<tr>
<td><input type="checkbox" class="checkezspeedkit" name="chkezspeedkit" onchange="valueChanged()"/></td>
<td>EZSpeed Kit</td>
<td>
<select name="Select1" style="width: 50px" class="qtyezspeedkit" >
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
</td>
<td>
<select name="Select2" style="width: 137px" class="qtyezspeedkit">
<option>Please select</option>
<option>Required</option>
<option>Option</option>
</select>
</td>
</tr>
<tr>
<td><input type="checkbox" class="checkezspeedkitbluetooth" name="chkezspeedkitbluetooth" onchange="valueChanged()"/></td>
<td>EZSpeed Kit - Bluetooth</td>
<td>
<select name="Select1" style="width: 50px" class="qtyezspeedkitbluetooth" >
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
</td>
<td>
<select name="Select2" style="width: 137px" class="optionezspeedkitbluetooth" >
<option>Please select</option>
<option>Required</option>
<option>Option</option>
</select>
</td>
</tr>
<tr>
<td><input type="checkbox" class="checkezspeedkitwifi" name="chkezspeedkitbluetooth" onchange="valueChanged()"/></td>
<td>EZSpeed Kit - Wi-Fi</td>
<td>
<select name="Select1" style="width: 50px" class="qtyezspeedkitbluetooth" >
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
</td>
<td>
<select name="Select2" style="width: 137px" class="optionezspeedkitbluetooth" >
<option>Please select</option>
<option>Required</option>
<option>Option</option>
</select>
</td>
</tr>
<tr>
<td><input type="checkbox" class="checkezenergykit" name="chkezspeedkitbluetooth" onchange="valueChanged()"/></td>
<td>EZEnergy Kit</td>
<td>
<select name="Select1" style="width: 50px" class="qtyezspeedkitbluetooth" >
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
</td>
<td>
<select name="Select2" style="width: 137px" class="optionezspeedkitbluetooth" >
<option>Please select</option>
<option>Required</option>
<option>Option</option>
</select>
</td>
</tr>
<tr>
<td><input type="checkbox" class="checkezenergykitbluetooth" name="chkezspeedkitbluetooth" onchange="valueChanged()"/></td>
<td>EZEnergy Kit - Bluetooth</td>
<td>
<select name="Select1" style="width: 50px" class="qtyezspeedkitbluetooth" >
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
</td>
<td>
<select name="Select2" style="width: 137px" class="optionezspeedkitbluetooth" >
<option>Please select</option>
<option>Required</option>
<option>Option</option>
</select>
</td>
</tr>
<tr>
<td><input type="checkbox" class="checkezenergykitwifi" name="chkezspeedkitbluetooth" onchange="valueChanged()"/></td>
<td>EZEnergy Kit - Wi-Fi</td>
<td>
<select name="Select1" style="width: 50px" class="qtyezspeedkitbluetooth" >
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
</td>
<td>
<select name="Select2" style="width: 137px" class="optionezspeedkitbluetooth" >
<option>Please select</option>
<option>Required</option>
<option>Option</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
これはPHPの関連性がわかりません... –