<script language="javascript" type="text/javascript">
function selectAll(ctlName, bool) {
var ctl = document.getElementById(ctlName);
var checkbox = ctl.getElementsByTagName('input');
for (var i = 0; i < checkbox.length; i++) {
if (checkbox[i].type == 'checkbox') {
checkbox[i].checked = bool;
}
}
}
function hasselect() {
var checkbox = document.getElementsByTagName('input');
var haschecked = false;
for (var i = 0; i < checkbox.length; i++) {
if (checkbox[i].type == 'checkbox') {
if (checkbox[i].checked) {
haschecked = true;
}
}
}
if (!haschecked) {
alert('请选择订单!');
return false;
}
}
</script>