通过screen.width和screen.height可以获取到屏幕的分辨率。
 

<!DOCTYPE html>
<html>
<head>

<script type="text/javascript">
	alert(screen.width);
	alert(screen.height);	
</script>

</head>
	
<body>
</body>
</html>