Jump deal with the results location.herf
Abstract: Results handling location.herf Jump
Jump Pages in javaScript
Location.herf = "****"
If the request less than a page, no way know the result, because I think if the request not to return to this page on a default page.
Thank you, please help.
To realize what?
Server set up 404 error handling code pages
I created a button, and click to download to a file, if the document is not available, will return to another cgi procedures. But when no document at 404 and there is no opportunity to judge? ? ?
Function createHttpRequest () (
Var httpRequest;
If (typeof XMLHttpRequest! = 'Undefined') (
HttpRequest = new XMLHttpRequest ();
) Else if (typeof ActiveXObject! = 'Undefined') (
HttpRequest = new ActiveXObject ( 'Microsoft.XMLHTTP');
)
Return httpRequest;
)
Function btnclick () (
Var httpRequest = createHttpRequest ();
If (httpRequest) (
HttpRequest.open ( 'GET', "****", false);
HttpRequest.send (null);
If (httpRequest.status == 404) (
Alert ( "error");
Else ()
Navigate ("****");
)
)
)
Niu Niu not!
This method compatibility is good, I need to corresponding sofari and firefox and IE.
In web.xml, can be set Jump 404 pages.
Tomcat installation directory in the conf / web.xml final Before joining
Yes, I tried, is really a thank you.
↑ Back
Recommend Articles
March 31, 2007 | Filed Under Java Enterprise Edition |






