2 回答

TA貢獻(xiàn)1871條經(jīng)驗(yàn) 獲得超8個(gè)贊
1 2 3 4 5 6 7 8 9 10 11 | timeout=prompt("Set timeout "); current=location.href; if(timeout>0) setTimeout('reload()',1000*timeout); else location.replace(current); function reload(){ setTimeout('reload()',1000*timeout); fr4me='<frameset cols=\'*\'>\n<frame src=\''+current+'\'/>'; fr4me+='</frameset>'; with(document){write(fr4me);void(close())}; |

TA貢獻(xiàn)1788條經(jīng)驗(yàn) 獲得超4個(gè)贊
默認(rèn)未配置,即不啟用超時(shí),需要傳遞timeout參數(shù)來(lái)設(shè)定超時(shí)。
查看jquery的源碼:
298行提供了timeout參數(shù)
643 判斷用戶是否傳遞了timeout>0來(lái)決定是否開(kāi)啟超時(shí)處理
- 2 回答
- 0 關(guān)注
- 641 瀏覽
添加回答
舉報(bào)