Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.9k views
in Technique[技术] by (71.8m points)

form表单跳转网页,获取来源referrer失败?

客户有个门户系统,和一个内管系统,需要在门户系统登录后,点击内管系统按钮,单点登录到内管系统。但是门户系统是用form表单跳转到内管系统,内管系统用js的?document.referrer 或者?window.opener.location.href 都无法获取来源url,想问下有没有办法获取在不改变form表单跳转的前提下,用js获取来源url?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

可以考虑自己主动跟一个参数在跳转尾巴里,比如表单触发跳转的时候请求跳转地址是XXXX.com?refer=XXX.com 然后跳过去后用JS拿这个小尾巴的值获取refer


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...