Posts Tagged ‘opener’

17 04 2009

js判断是否为弹出窗口

bigCat Posted in JavaScript - 6 Comments

function suicide(){window.opener.focus();window.close();}\n if (window.opener == null) {\n window.location="/";\n } else { \n window.resizeTo(800, 500);\n setTimeout('suicide()', 10000);\n }

Host: (miao) | Word: Press | Code: HTML5