# 重新導向(Redirection) ###### tags: `NKFW 網頁設計入門` ## 介紹 * 我們可以透過Javascipt來自動為使用者導向不同網頁,例如: ```htmlembedded! window.location = "https://hackmd.io/EzIAuqrkQ22IgSdI1Ts6nQ"; ``` 其中雙引號中即為目標網頁的網址。 * 可以搭配setTimeBack()做到讓使用者在特定秒數後重新導向。 :::spoiler 參考範例 ```htmlembedded! setTimeout(function() { window.location = "https://hackmd.io/EzIAuqrkQ22IgSdI1Ts6nQ"; }, 3000); ``` :::