w = window.open("","","height=300,width=300"); w.document.writeln('<button onclick="window.opener.close();">Я кнопка!</button>');