Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how to add window close button code in jquery
Posted
Updated 3-Sep-14 23:09pm
v2

See this w3schools example

http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_close[^]

If you want to add close button on same window try this simple web page example. Coppy this code and save it as html file and see.

HTML
<!DOCTYPE html>
<html>
<body>

<input type="button" onclick="window.close();" />

<script>

$(document).ready(function(){
$(".close").click(function(){ 
window.close();
});
	});
</script>

</body>
</html>
 
Share this answer
 
v2
This is the sixth time you have posted this query (I deleted the oldest one). Please stop reposting or you are likely to be banned from the site.

If you have additional information to add to your question then use the Improve question link to edit your post.
 
Share this answer
 
Comments
Gihan Liyanage 4-Sep-14 5:14am    
OMG.. I didn't see...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900