window.open("http://localhost/ds.jsp?txt1="+ document.formName.txt1.value)

解决方案 »

  1.   

    我在父窗口在的页面有一个隐含的txt1  
    <input  type="hidden"  name="txt1">  
    在弹出的窗口的url需要显示该txt1的值,是用参数传递带过去的,如:  
    <input type="button" onclick="javascript:window.open('http://localhost/ds.jsp?txt1='+txt1.value+'&txt2='+txt2.value+,'','')">
      

  2.   

    <input type="button" onclick="javascript:window.open('http://localhost/ds.jsp?txt1='+txt1.value+'&txt2='+txt2.value+'','','')">