/ Published in: JavaScript
URL: www.tecnocrazia.com
Expand |
Embed | Plain Text
function get_root(obj, current_ref) { if(obj.parent.location.href != current_ref) { return get_root(obj.parent, obj.location.href); } else { return obj; } } Usage: get_root(window, window.location.href).location.href
You need to login to post a comment.
