স্ক্রিন রেজোলিউশন জানতে window.screen.availWidth এবং window.screen.availHeight ব্যবহার করুন।
উদাহরণ
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
</head>
<body>
<script>
console.log("Available Width=" + window.screen.availWidth);
console.log("Available Height=" + window.screen.availHeight);
</script>
</body>
</html>
Live Server দিয়ে চালালে ব্রাউজার কনসোলে প্রস্থ ও উচ্চতা দেখাবে।
আউটপুট
উদাহরণস্বরূপ: Available Width=1366, Available Height=768