a.jsp 页面<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
function openScript(url,name, width, height){
var param="?sType="+document.form.stype.value;
var Win = window.open(url+param,name,'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes');
}
</script></head>
<body bgcolor="#ffffff">
<a href=# onClick="openScript('b.jsp','pur',300,250)" >传值</a><br/>
<form name="form">
  <input type="" name="stype"/>
</form>
</body>
</html>b.jsp 页面
<html>
<head>
<title>title</title>
<SCRIPT LANGUAGE=javascript>
function save(){
var v=document.theForm.type.value;

window.opener.document.form.stype.value=v;
window.close();
  }
  
  </script></head>
<body>   
<form name="theForm">
<tr><td><label>
  <input type="radio" name="type" value="a">
</label>
    <label>
    a
    <input type="radio" name="type" value="b">
    </label></td>
  </tr>
    <tr>
       <td colspan="2" align="center">
 b
 <input type="submit" name="store" value="保存" onClick="save()">          
 <input type="reset" name="reset" value="取消" onClick="window.close()">
  </form>
</td>
    </tr>
</body>
</html>
为什么b页面向a页面传不过去值。大侠帮忙改下

解决方案 »

  1.   

    你这什么代码
    table没有,就trtd
    改好了在来
      

  2.   

    不用table 直接就可以测试的。
      

  3.   

    <script>
    function doit(){
        var s = "";
        var a = document.getElementsByName("ck");
        for(var i=0;i<a.length;i++){
            if(a[i].checked){
    s+= a[i].value + ",";
    }
        }
        if(s!=""){
    s = s.substr(0,s.length-1);
    }
        document.getElementById("pad").innerHTML = s;
    }
    </script>
    <form>
    <input type="checkbox" name="ck" value="1" onclick="doit()">
    <input type="checkbox" name="ck" value="2" onclick="doit()">
    <input type="checkbox" name="ck" value="3" onclick="doit()">
    <input type="checkbox" name="ck" value="4" onclick="doit()">
    <input type="checkbox" name="ck" value="5" onclick="doit()"></form>
    <span id="pad"></span>