<!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 http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript">
function CheckedHandler(){
var strVal = [];
$(":checked").each(function(){
strVal.push($(this).val());
});
$("#txtcheckbox").val(strVal);
alert(strVal.length + " " + strVal);
}
</script>
</head>
<body>
<table>
<tr>
<td height="30">
<input type="checkbox" class="chbox" value="有风度" /><label>有风度</label>
</td>
<td>
<input type="checkbox" class="chbox" value="威严" /><label>威严</label>
</td>
<td>
<input type="checkbox" class="chbox" value="亲切" /><label>亲切</label>
</td>
<td>
<input type="checkbox" class="chbox" value="血性汉子" /><label>血性汉子</label>
</td>
<td>
<input type="checkbox" class="chbox" value="小白脸" /><label>小白脸</label>
</td>
<td>
<input type="checkbox" class="chbox" value="绅士气质" /><label>绅士气质</label>
</td>
<td>
<input type="checkbox" class="chbox" value="肤白" /><label>肤白</label>
</td>
<td>
<input type="checkbox" class="chbox" value="黝黑" /><label>黝黑</label>
</td>
<td>
<input id="txtcheckbox" type="text" />
<input name="btn" type="button" onclick="CheckedHandler();" value="提交" />
</td>
</tr>
</table>
</body>
</html>