Show Popup in Center of the User Screen

Date Published: 28/09/2020 Published By: JaiSchool

<!DOCTYPE html>
	<title>Show popup in the center of the user screen</title>

<button onclick="show_pop()">Open</button>

	function show_pop(){
		var screen_widht = window.screen.width;
		var screen_height = window.screen.height;
		var popup_width = 800;
		var popup_height = 500;
		var top = (screen_height/2)-(popup_height/2);
		var left = (screen_widht/2)-(popup_width/2);"","","width="+popup_width+",height="+popup_height+",top="+top+",left="+left);


Publish A Comment

Leave a Reply

Your email address will not be published. Required fields are marked *