开发者

How can i get the hash value from an iframe src?

My iframe is having a url with a hash value开发者_如何学JAVA when i do iframe.src it just gives me the url without the hash appended to it from the other domain. Can i read the entire url with the hash.


Not likely due to security constraints - I am surprised you can even get the URL

Can you show the code?

Sounds like a duplicate of How to get iframe contentWindow height in cross domain


var contentWnd = $('iframe').attr('contentWindow');
var hash = contentWnd.window.location.hash;

Adaptation of this answer: Get url from iframe and update hash in browser url

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜