日期:2014-05-17 浏览次数:20701 次
<table>
<tbody>
<tr>
<td><input type="checkbox" name="subBox"/></td>
<td>
<select>
<option value="a" >aaaaaaaaaaa</option>
<option value="b" >bbbbbbbbbbb</option>
<option value="c" >ccccccccccc</option>
<option value="d" >ddddddddddd</option>
<option value="e" >eeeeeeeeeee</option>
</select>
</td>
</tr>
<tr>
<td><input type="checkbox" name="subBox"/></td>
<td>
<select>
<option value="a" >aaaaaaaaaaa</option>
<option value="b" >bbbbbbbbbbb</option>
<option value="c" >ccccccccccc</option>
<option value="d" >ddddddddddd</option>
<option value="e" >eeeeeeeeeee</option>
</select>
</td>
</tr>
</tbody>
<tfoot>
<input type="button" value="提交更改" onclick="" class="button" id="submit">
</tfoot>
</table>
$("#submit").click(function() {
var a = $("input:checked");
var b = ' ';
var c = ' ';
for(var i=0;i<a.length;i++){
b = a[i].value;
c += "["+$("#sel"+b).val()+"],";
}
if(c.lastIndexOf(",") != -1) c = c.substring(0, c.lastIndexOf(","));
alert(c);
})