How to close a pop-up window in Javascript?

 Posted by vishalneeraj-24503 on 1/13/2014 | Category: JavaScript Interview questions | Views: 776 | Points: 40
Answer:

We use self.close() or window.close() method to close any pop-up window:-

<a href='javascript:window.close()'>X</a>


//Or

<a href='javascript:self.close()'>X</a>


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response