2014年5月17日星期六

JSP to get the form specified data








<%
request.setCharacterEncoding ("gb2312");
Unit_Find uf = new Unit_Find ();
ArrayList hm = new ArrayList ();
String sql = "select Agr_Name, Agr_AgId, Agr_Exa from Agreement";
ResultSet rs = uf.find (hm, sql);
/ / If the status of the audit prompted the output layer
while (rs.next ()) {
if (rs.getString (3). length () == 2)
{
%>






<%
}
}
String Agr_Name = request.getParameter ("Agr_Name");
String Agr_AgId = request.getParameter ("Agr_AgId");
%>

Contract Name Contract Number operation
< / a>



As shown in the code should be displayed behind each line has an OK button , you can get to that line of data and click OK, how to do this ,
According to a friend of tips to keep in the back of a name <% = i%> i is a cycle value , plus one each time , so you can get a different name or in accordance with this ID, but the question is how do I know when to get hits in the first few buttons of it

------ Solution ------------------------------------ --------

  
No Oh you said I added into it, and then I tested the following :   
  
  
not a bomb  

fromSubmit ('<% = rs.getString (2)%>') brackets Riga single or double quotes . Transfer function , there must be , I do not know if you tune the function name is which.
As long as the page has a value, it is possible to pass
------ For reference only -------------------------- -------------
button plus an on click event
onclick = "fromSubmit (<% = rs.getString (2)%>) and then are placed in a piece of form submission Good
fromSubmit function go manipulated ,
------ For reference only -------------------------- -------------


No Oh you said I added into it, and then I tested the following :


not bombs of
------ For reference only ---------------------------- -----------

    
No Oh you said I added into it, and then I tested the following :     
    
    
not a bomb          
  
fromSubmit ('<% = rs.getString (2)%>') brackets Riga single or double quotes . Transfer function , there must be , I do not know if you tune the function name is which.   
As long as the page has value, it can pass  
Thank you ah you 're right '' good points can be moved up and expand !
------ For reference only -------------------------------------- -

      
No Oh you said I added into it, and then I tested the following :       
      
      
not a bomb                
    
fromSubmit ('<% = rs.getString (2)%>') brackets Riga single or double quotes . Transfer function , there must be , I do not know if you tune the function name is which.     
As long as the page has value, it can pass          
Thank you ah you 're right '' good points can be moved up and expand !  

resolved just fine.

没有评论:

发表评论