标签: javascript jquery html
有没有办法识别客户在地址栏中输入的页面地址 在发送请求之前我需要这些信息 可能在onbeforeunload
onbeforeunload
答案 0 :(得分:5)
除非导航是由页面中的某些内容引起的(例如,点击链接),否则上一页无法找到用户导航到的位置。
如果可能的话,它将允许一些严重的隐私侵权行为。
答案 1 :(得分:0)
在Javascript中,您应该可以从document.location获取完整的网址,(例如var URLstring = document.location;)。
document.location
var URLstring = document.location;