idhttp中如何處理javascript方式的頁面轉向呢? |
尚未結案
|
linxi
一般會員 發表:17 回覆:15 積分:6 註冊:2004-08-29 發送簡訊給我 |
我最近在做一個個類似瀏覽器的東西,用的是idhttp物件,我將HandleRedirects
屬性設置為true,但是當遇到非302方式的頁面轉向時,就無法轉向正確的網頁,例如碰到下面的javascript 頁面,瀏覽器就停止了,要如何才能到達正確的頁面呢? <head>
<!--
//window.history.back(2);
window.history.forward(1);
function clicktoit () {
document.forms[0].submit();
}
//--> </head><body >
<form action="/3.php">
<input type=hidden name="time" value="1095902685">
<input type=hidden name="check" value="379b2e9b965a9f0e01199afd28266532">
<input type=hidden name="sid" value="1942"><input type=hidden name="goto" value="70122e85dc356ee63f4055cad24108c2-MTA5NTkwMjYzOQkyNC4xODYuOTcuMjUyCQlwX3JzMDEJMTk0Mgl3YXRjaGVzCWthbm9vZGxlCWh0dHA6Ly93d3cua2Fub29kbGUuY29tL2NsaWNrdGhyb3VnaC5jb29sP3Bvc2l0aW9uPTcwMDEmdGlkPWJobmdicG5sYnBuZ2Jpbm1ibG5oemRvenhhcmR4YyZiaWQ9MC4xMSZlaWQ9MSZpZD03MzQ3NzM1MSZxdWVyeT13YXRjaGVzJmNsaWNraWQ9NDMxNzgyMzQmVU5RPTAwMTA5NTkwMjY1MTgxNzYyODQ1JnN1YmlkPTgwNjQ0MDQ4CTAuMDcJMAkxCQk="><input type=hidden name="referrer" value=""><noscript><input type="submit" value="Click here to redirect to this website."></noscript></form></body
|
wameng
版主 發表:31 回覆:1336 積分:1188 註冊:2004-09-16 發送簡訊給我 |
Redirection ResponseCodes include the following: 300 - Multiple Choices. The request can be fulfilled with one of a set of resources, each with its own specific location. The HTTP client can select a preferred representation and redirect its request to that location. 301 - Moved Permanently. The requested resource has been assigned a new permanent URI and any future references to this resource should use the new location specified in the Response. 302 - Found. The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client should continue to use the URI in the Request for future requests. 304 - Not Modified. If the client has performed a conditional GET request and access is allowed, but the document has not been modified, the server should respond with this status code. The 304 response should not contain a message body, and is always terminated by the first empty line after the header fields, and must include a Date header. 305 - Use Proxy. The requested resource must be accessed through the proxy given by the Location header in the HTTP Response containing the URI of the Proxy. 307 - Temporary Redirect. The requested resource resides temporarily under a different URI. Since the redirection may be altered on occasion, the HTTP client should continue to use the URI in the RequestI for future requests. 非 302 HandleRedirects 無法自動轉吧! 我覺得自己寫程式判斷就可以了!
|
linxi
一般會員 發表:17 回覆:15 積分:6 註冊:2004-08-29 發送簡訊給我 |
|
wameng
版主 發表:31 回覆:1336 積分:1188 註冊:2004-09-16 發送簡訊給我 |
|
timhuang
尊榮會員 發表:78 回覆:1815 積分:1608 註冊:2002-07-15 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |