js获取上一页、当前页及域名url方法,JS反回上一页的方法

来源:互联网 发布:smartwatch2软件下载 编辑:程序博客网 时间:2024/05/19 21:40

<html>

<head>

<title>js获取上一页url,js获取前一页地址,javascripts获取上一页url,javascript获取前一页地址</title>

<meta http-equiv="keywords" content="" />

</head>

<body>

<script language="javascript">

document.write("js获取当前域名"+window.location.host+"或者"+document.domain+"<br>");

document.write("js获取当前url"+window.location.href+"<br>");

document.write("js获取上(前)一页url"+document.referrer);

</script>

</body>

</html>

原创粉丝点击