开发者

checking the page exist or not using javascript and ajax [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicate:

How to check if a page is exist or not using javascript

can you provide the code for checking the page exi开发者_开发知识库st or not.if not,it will redirect to another page.


The problem is, if the page doesn't exist (the server is given what it considers an invalid url that it cannot satisfy), you will get a 404 error. So no code on any target page is going to run. Instead you have to do this server side, specifying what page to serve instead when a 404 is encountered. It is not done with client-side javascript.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜