//获取当前域的top对象topWindow
window.topWindow = function () {
var obj = window.self,
t_obj = obj;
try {
if (window.top.location.host) {
return window.top;
}
} catch (e) {
while (true) {
try {
if (obj.location.host) {
t_obj = obj;
obj = obj.window.parent;
}
} catch (e) {
return t_obj;
}
}
}
}();