<html>
<head>
<title>untitled document</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#ffffff" text="#000000">
<table width=100% height=4% border=0 cellspacing=1 cellpadding=2 bordercolorlight=#000000 bordercolordark=#333333 align="center">
<tr bgcolor="#cccccc">
<td width="9%" height="7" >
<div align="center">选择</div>
</td>
</tr>
<form method=post action="" name="post">
<tr bgcolor="#cccccc">
<td width="9%" height="12" >
<input type="checkbox" value="1" onclick="putvalueto(this,1)" name="checkbox">
<input type="checkbox" value="2" onclick="putvalueto(this,2)" name="checkbox">
<input type="checkbox" value="3" onclick="putvalueto(this,3)" name="checkbox">
<input type="checkbox" value="4" onclick="putvalueto(this,4)" name="checkbox">
<input type="hidden" name="formsel" value="">
</td>
</tr>
</table></form>
</body>
</html>
<script>
function putvalueto(y,x){
var impitemid=;
var ob_form1=document.post
var ob_out=ob_form1.formsel
var str_out="" + ob_out.value
if (y.checked){
impitemid=x
}
else {
var str1=""+x
var i_star=str_out.indexof(x)
str_out=str_out.substr(0,(i_star-1))+str_out.substr((i_star+1))
if (str_out.substr(0,1)==",")
{str_out=str_out.substr(1)}
if (str_out.substr((str_out.length-1))==",")
{str_out=str_out.substr(0,str_out.length-1)}
if (str_out.indexof(",,")>0)
{var i1=str_out.indexof(",,")
str_out=str_out.substr(0,i1-1)+str_out.substr(i1+1)
}
impitemid==
}
if (!impitemid==) {
if (str_out==) {
str_out=impitemid
}
else {
str_out=str_out+,+impitemid
}
}
ob_out.value=str_out
alert (ob_form1.formsel.value);
}
</script>
