日期:2014-05-16 浏览次数:20449 次
<!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=utf-8" />
<title></title>
<script type="text/javascript">
window.onload = function () {
var obox = document.getElementById("aLiterADiv");
var cboList = obox.getElementsByTagName("input");
var oText = document.getElementById("txtLoadList");
document.getElementById("aLiterADiv").onclick = function (e) {
var src = e ? e.target : event.srcElement;
if (src.tagName == "INPUT") {
var values = [];
for (var i = 0; i < cboList.length; i++) {
if (cboList[i].checked) {
values.push(cboList[i].value);
}
}
oText.value = values.join(",");
}
}
}
</script>
</head>
<body>
<p>
<input type="text" id="txtLoadList" /></p>
<div id="aLiterADiv">
<label>
<input type="checkbox" value="这" />这</label>
<label>
<input type="checkbox" value="里" />里</label>
<label>
<input type="checkbox" value="是" />是</l