在按钮中写好参数调用就是了。
<SCRIPT language=javascript>
//加入参数确定打开的大小。
function modelesswin(url,mwidth,mheight){
url=url+"?uid="+cname.uid.value+"&nick="+cname.nick.value//这里加上你要传递的参数就是了。if (document.all&&window.print) //if ie5
eval('window.showModelessDialog(url,"","help:0;resizable:0;dialogWidth:'+mwidth+'px;dialogHeight:'+mheight+'px")')
else
eval('window.open(url,"","width='+mwidth+'px,height='+mheight+'px,resizable=1,scrollbars=0")')
}
</SCRIPT >

解决方案 »

  1.   

    这样接收的只为underfine好象showmodaldialog是不能传递值的··
      

  2.   

    或者这样<input type=button onclick="opend();">
    <script>
    function opend(){
    var str=""
    var o=document.getElementsByName("chk");
    for(i=0;i<o.length;i++)
      str+=o[i].value+","
    window.showModalDialog('b.asp',str);
    }
    </script>
    b.asp
    <script>
    xxx.value=window.dia,,,,,,;
    </script>
      

  3.   

    a.asp<script language=javascript>
    function tt()
    {
    var obj=document.frm;
    var v;
    for(var i=0;i<obj.elements.length;i++)
     {if(obj.elements[i].checked)v=v+obj.elements[i].value}
    if(v!="")
     window.showModalDialog("b.asp?v="+v,"","dialogheight=200px;dialogwidth=300px") 
    }
    </script>
    <form name=frm>
    <input type="checkbox" name="chk" value="1">1<br>
    <input type="checkbox" name="chk" value="2">2<br>
    <input type="checkbox" name="chk" value="3">3<br>
    <input type=button name=dd value="test" onclick="javascript:tt()">
    </form>b.asp
    <input name=test value="<%=request.querystring("v")%>">
      

  4.   

    问题思路一:在窗口A.asp中有三个checkbox名称是chk,我点一个Button然后使用showmodaldialog弹出一个窗口B.asp,我想把其中的CHK的值传递到B.asp中的一个文本框中!!!如何做???<script language=javascript>
    function tt()
    {
    var obj=document.frm;
    var v="";
    for(var i=0;i<obj.elements.length;i++)
     {if(obj.elements[i].checked)v=v+obj.elements[i].value+"$$";//用$$分割各个值}
    if(v!="")
     window.showModalDialog("b.asp?v="+v,"","dialogheight=200px;dialogwidth=300px") 
    }
    </script>
    <form name=frm>
    <input type="checkbox" name="chk" value="1">1<br>
    <input type="checkbox" name="chk" value="2">2<br>
    <input type="checkbox" name="chk" value="3">3<br>
    <input type=button name=dd value="test" onclick="javascript:tt()">
    </form>
    思路二:直接把a.asp中的提交到c.asp中,但要求c.asp用showmodeldialog的方式打开!!!好像只能结合js用get方法提交
      

  5.   

    sunfic(菜菜龙) :你的方法能把值传过去。谢谢了哈···不过我还想找找其他的方法。过一段时间我一定会给你加分的