Advertise

Friday, 24 August 2012

WINDOW OPEN & CLOSE


Focus

  1. window.open()
  2. window.print()
compatibility:   firefox would not support this close current window
Reason:   firefox can't close windows it didn't create. it can close any window that it open.

main code:

//window.print()
onclick="javascript: window.print();"

//window.open()
onclick="javascript:
                    var win = window.open('', '_self');
                    win.close();return false;"

Entire Source code

Head up!  only HTML,CSS and result are available

0 comments:

Post a Comment