<button onclick="W_H_Function()">Get Current Width and Height</button>
<p id="scree_size"></p>
<script type="text/JavaScript">
function W_H_Function() {
document.getElementById("scree_size").innerHTML = "Width: " + window.innerWidth
+ "<br / >Height: " + window.innerHeight;
}
</script>