ask.jsp—answer.jsp静态页面传值

ask.jsp

<script language="javascript" type="text/javascript">
function Open()
{

window.open('<%=path%>/jsp/answer.jsp' ,'_blank','top=250,left=300,width=500 height=100');
}
</script>

  <body>
 <form   onsubmit= "return  new_window(); " >
  <input type="text" name="tbValue"><a href="javascript:" onclick="Open();">Open http://www.dwww.cn </a>
  
 </form>
  </body>

answer.jsp

 <script language="javascript" type="text/javascript">
  function SetValue(value)
  {
  self.opener.document.all("tbValue").value=value;
  self.close();
  }
  </script>

 
 
<body>
    Values:<br/>
<a href="javascript:SetValue('1')">value 1</a><br/>
<a href="javascript:SetValue('2')">value 2</a>

  </body>

 





你可能感兴趣的:(ask.jsp—answer.jsp静态页面传值)