怎么取到单选框里的值啊?
我有2个页面 第一个页面调用第二个页面 在第2个页面有一组单选框 再选择了之后怎么要把值传到第一个页面中
第一个页面:
function showstate(obj)
{
dv=window.showModalDialog( "state.htm ", "44 ", "center:1;help:no;status:no;dialogHeight:246px;dialogWidth:216px;scroll:no ")
if (dv) {if (dv== "null ") obj.value= ' ';else obj.value=dv;}
}
第二个页面
<script language= "javascript ">
// Written by cloudchen, 2004/03/16
function sendTo(dvalue)
{
if (!dvalue)
{window.returnValue = " "}
else
{window.returnValue = dvalue}
window.close()
}
</script>
<html>
<head>
<title> 添加日期 </title>
</head>
</html>
<div align=center>
<table border= "0 " width= "180 ">
<tr> <td>
<fieldset class= "c_fieldset "> <legend class= "c_legend "> 日期 </legend>
<!-- 调用日历 -->
<!-- 调用日历 --> <form id= "form1 " name= "form1 " method= "post " action= " ">
<p>
<label>
<input type= "radio " name= "bz " value= "单选 " />
编制 </label>
<br />
<label>
<input type= "radio " name= "bz " value= "下达 " />
下达 </label>
<br />
<label>
<input type= "radio " name= "bz " value= "执行 " />
执行 </label>
<br />
</p>
</form>
</fieldset>
</td>
</tr>
<tr>
<td align= "right ">
<button onclick= "sendTo(document.form1.bz.value) " style= "border:1px outset;font-size:12px ">
确定 </button>
</td>
</tr>
</table>
</div>
我哪里有错 第2个页面就是传不到第1个页面去.
------解决方案--------------------window.returnValue = dvalue;
window.top.hidePopWin(true);
------解决方案-------------------- <script language= "javascript ">
// Written by cloudchen, 2004/03/16
function sendTo(obj){
for(var i=0;i <obj.length;i++){
if(obj[i].checked){
window.returnValue = obj[i].value;
//window.hidePopWin(true);
//window.close();
}
}
window.returnValue = " ";
}
</script>
<html>
<he