detect height and width of current screenh

Code :

<script>
function my()
{
var Screen_Height = window.innerHeight;
var Screen_width = window.innerWidth;
alert("Width="+Screen_width+", Height ="+Screen_Height);
} </script>
<button onclick="my()">Scrren Resoluation</button>

Comments