jsp 获取当前页面的radio值,并传给前一个页面

上一篇 / 下一篇  2012-06-07 14:33:40 / 个人分类:web

<%@ page contentType="text/html; charset=GBK" %>
<script. type="text/javascript">
 function show(){
    var users = document.getElementsByName("check");
  for(i=0;i<users.length;i++){
   if(users[i].checked)
   subform.subText.value=users[i].value;
   opener.document.forms[0].mainText.value = subform.subText.value;  //前一个页面input

  }
 }
</script>
<!%
 bool

%>
<html>
 <body>
  <form. name="subform" action="sub.jsp">
   子窗口
   <hr>
   <input type="text" name="subText" value=""><input type="button" name="subT" value="显示" nClick="show()">
   <input type="radio" name="check" value=1>1
   <input type="radio" name="check" value=2>2
  </form>
 </body>
</html>


TAG: JSP jsp Radio radio input

 

评分:0

我来说两句

Open Toolbar