This time, you can select your favorite color on the homepage to go to the corresponding page.
Select green to go to the green page:
Select red to go to the Red Page:
Okay. Here we will see four pages:
Select the color in index. jsp and click the
Response. by default, rederect redirects to this page. Therefore, besides using Windows in JS. in addition to the open or add target attribute to tag a, it seems that you cannot open a new page in the background. Otherwise, you can set the target
SummaryTo achieve webpage redirection in ASP. NET, You can implement the following four methods:1. Redirect through hyperlinks.2. Use cross-page sending technology to redirect webpages.3. Redirect web pages through browser programming.4. Redirect
Document directory
Syntax
Example
Summary:Response. Redirect: client actionServer. Transfer: Server action. ie cannot perceive the redirection and can pass the current page environment.Server.exe cute: Server action. ie cannot perceive the
1. RequestDispatcher. forward ()
Is used on the server. When forward () is used, the Servlet engine transmits the HTTP request from the current Servlet or JSP to another Servlet, JSP or common HTML file, that is, your form is submitted to. jsp, in.
In general, response. the redirect method is switched on the server side, so unless response. write (" ") the specified URL address cannot be opened in a new window. However, if you carefully analyze it and set the target attribute of the form
Generally, the browser receives a webpage containing
Code . This page may be converted on the server side. In this case, the browser only receives one page, and the automatic redirection usually means that the page received by the browser has the
1 Using JS implementation
Copy CodeThe code is as follows:
if (! $this->userinfo) {
$alert _msg = "Activation link error";
echo "";
Redirect (Base_url ());
Die
}
2 PHP implementations
Copy CodeThe code is as follows:
if (! $this->userinfo)
Generally, a browser receives a webpage containing code that automatically loads other webpages. This page may be converted on the server side. In this case, the browser only receives one page, and the automatic redirection usually means that the
Author: BIBI
Whenever we think of hackers, hackers tend to be such a portrait: A lonely person, sneaking into someone else's server to sabotage or steal other people's secret information. Perhaps he will change our homepage, who will steal the
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.