Home >
Web Front-end >
JS Tutorial >
js ideas and operations for obtaining computer resolution_javascript skills
js ideas and operations for obtaining computer resolution_javascript skills
WBOY
Release: 2016-05-16 17:12:59
Original
1516 people have browsed it
When making a page, the user requires different resolutions and different positions of the pop-up window. I wonder if I should first obtain the screen width, then pay the value to the variable, and then set the parameters in onclick
< ;script> function centerWindow(url,w,h){ l=(screen.width-w)/2 t=(screen.height-h)/2 window.open (url,'','left=' l ',top=' t ',width=' w ',height=' h) }
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn