title: How to pass the values from one jsp page to another jsp without submit button?
body: <p>This is my demo1.jsp page,</p>
  
  <pre><code>&lt;body&gt;
      &lt;form id="myform" name="myform" method="post" action="demo2.jsp"&gt;--&gt;
      &lt;input type="text"  name="usnername" /&gt;
      &lt;input type="text" name="password"/&gt;        
      &lt;input type="submit" value="go" onclick="window.location.href='demo2.jsp'" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p></p>
  
  <p>This is my demo2.jsp</p>
  
  <pre><code>&lt;body&gt;
      &lt;%
      String Uname=request.getParameter("usnername");
      String Usecret=request.getParameter("password");
      out.println(Uname);
      out.println(Usecret);
      %&gt;
  </code></pre>
  
  <p></p>
  
  <p>Here this code is working fine but ,How can i get values from demo1 to demo2 without using sumbit button?i.e., <code>&lt;input type="submit" value="go" onclick="window.location.href='demo2.jsp'" /&gt;</code> bt using input type="button" can we send values.</p>