每次都忘記來做個記錄
<form action="save.jsp" method="post" name="form_a" >
<input type=checkbox name='gother' value='01'>
<input type=checkbox name='gother' value='02'>
<input type=checkbox name='gother' value='03'>
</form>
JavaScript可以用下列方式取得值
<script language="JavaScript">
function fugoto() //==轉送資料==
{
var vchk = "";
var ck = document.form_a.elements["gother"];
for (var i=0;i < ck.length;i++)
{
if ( ck[i].checked)
{
if ( vchk != "" )
vchk = vchk + ",";
vchk = vchk + ck[i].value;
}
}
}
</script>
全站熱搜
留言列表