In Java Web Development, JSP uses the frameset framework, how to implement the entire page jump, and can submit two Action__java in the same form

Source: Internet
Author: User
Tags java web

Directly on the code ...

<script language= "JavaScript" > Function login ()
{
Document.form1.action= "Loginaction_login";
window.parent.location.href= "Loginaction_login"//This method will not pass the value in input, but can also achieve the entire page of the jump
Document.form1.submit ();
}

function Register ()
{
Document.form1.action= "Loginaction_register";
Document.form1.submit ();
window.parent.location.href= "Loginaction_register"//This method will not pass the value in input, but can also achieve the entire page of the jump
}
</Script>
<body>
<div id= "Login" >
<div class= "Left" >
<div class= "Text" >
Welcome to the use of university personnel and vehicle Management system, please log in first, if not registered in this site, please register first.
</div>
<div class= "Input" >
<form name= "Form1" method= "Post" target= "_top" >
<tr>
<td></td>
<td><input class= "User" type= "text" name= "username" ></td>
</tr>
&LT;HR size= "1" width= "235px" >
<br>
<tr>
<td></td>
<td><input class= "password" type= "password" name= "password" ></td>
</tr>
&LT;HR size= "1" width= "235px" >
<br>
<tr>
<td></td>
<td>
<select class= "Select" name= "Role" >
<option value= Administrator > Admin </option>
<option value= "user" > User </option>
</select>
</td>
</tr>
&LT;HR size= "1" width= "235px" >
<br>
<tr>
<td><input class= "Submit" type= "button" value= "Login" onclick= "login ()" ></td>
<td>&nbsp;</td>
<td><input type= "button" value= "Forget password" ></td>
<td>&nbsp;</td>
<td><input type= "button" value= "register" onclick= "register ()" ></td>
</tr>
</form>
</div>
</div>
</div>
</body>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.