MyException - 我的异常网
当前位置:我的异常网» Java Web开发 » 看看小弟我的代码是不是异常 请

看看小弟我的代码是不是异常 请

www.MyException.Cn  网友分享于:2013-01-29  浏览:2次
看看我的代码是不是错误 请高手指点
<%@   page   language= "java "   contentType= "text/html;charset=gb2312 "%>
<form   method= "post "   name= "form3 ">      
      <tr>
            <td>
              <input   name= "ddfind "   type= "radio "   value= "订单查询 "   checked= "checked "   id= "2 "   /> 订单查询&nbsp;&nbsp;&nbsp;
              <input   name= "ddfind "   type= "radio "   value= "合同查询 "   id= "3 "/> 合同查询
              </td>
        </tr>
</form>
<script   language= "JavaScript ">
  var   ff   =   document.form3;
  if(ff.2.checked= "checked "){
<%@   include   file= "zy_info_10.jsp "   %>
  }
  if(ff.3.checked= "checked ")
  {
  <%@   include   file= "contract_search.jsp "%>
  }
</script>

------解决方案--------------------
怎么能在客户端操作服务端对象呢?改成这样的
<%@ page language= "java " contentType= "text/html;charset=gb2312 "%>
<form method= "post " name= "form3 " action= "action.asp "> /**提交到action*/
<tr>
<td>
<input name= "ddfind " type= "radio " value= "订单查询 " checked= "checked " id= "2 " /> 订单查询&nbsp;&nbsp;&nbsp;
<input name= "ddfind " type= "radio " value= "合同查询 " id= "3 "/> 合同查询
</td>
</tr>
</form>

action.jsp
<%
String nowValue=request.getParameter( "ddfind "); //取得ddfind的值
String tempFile=nowValue.equals( "订单查询 ")? "zy_info_10.jsp ": "contract_search.jsp ";
response.sendRedirect tempFile;
%>
------解决方案--------------------
支持

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有