js method to get the previous page, current page and domain name url, JS method to return to the previous page

//获取当前域名 
window.location.host 或者document.domain

//获取当前url 
window.location.href 

//获取上(前)一页url 
document.referrer

Guess you like

Origin blog.csdn.net/u013456390/article/details/105714238