| |

VerySource

 Forgot password?
 Register
Search
View: 637|Reply: 1

See if my code is wrong, please master

[Copy link]

3

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 Germany

Post time: 2020-1-25 09:00:01
| Show all posts |Read mode
<% @ page language = "java" contentType = "text / html; charset = gb2312"%>
<form method = "post" name = "form3">
   <tr>
      <td>
<input name = "ddfind" type = "radio" value = "Order query" checked = "checked" id = "2" /> Order query&nbsp;&nbsp;&nbsp;
<input name = "ddfind" type = "radio" value = "contract query" id = "3" /> contract query
       </ 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>
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Great Britain

Post time: 2020-2-15 18:30:01
| Show all posts
How can you manipulate server objects on the client? Change to this
<% @ page language = "java" contentType = "text / html; charset = gb2312"%>
<form method = "post" name = "form3" action = "action.asp"> / ** Submit to action * /
   <tr>
      <td>
       <input name = "ddfind" type = "radio" value = "Order query" checked = "checked" id = "2" /> Order query&nbsp;&nbsp;&nbsp;
       <input name = "ddfind" type = "radio" value = "contract query" id = "3" /> contract query
       </ td>
    </ tr>
</ form>

action.jsp
<%
String nowValue = request.getParameter ("ddfind"); // Get the value of ddfind
String tempFile = nowValue.equals ("Order query")? "Zy_info_10.jsp": "contract_search.jsp";
response.sendRedirect tempFile;
%>
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list