123
function isWindowObject(obj){ return obj.window === obj.window.window}
參考: http://blog.csdn.net/cheng5128/archive/2010/02/20/5313654.aspx