javascript - how to make a button on a popup window that closes that popup window -
i have made popup window button that's supposed close window. however, not work. here code:
winpopup.document.write(<input type = "button" value = "close window" onclick = "closewindow();">) function closewindow(){ winpopup.close(); }
winpopup doesn't have closewindow() method. use opener's.
function closewindow(){ opener.winpopup.close(); }
Comments
Post a Comment