Learn free online HTML5, javascript, and jquery Tutorials by Examples

Wednesday 21 May 2014

How we can get document size in javascript

----------------------------------------------------------
function displayDocumentSize() {
var docWidth = document.body.clientWidth;
console.log(docWidth);
var docHeight = document.body.clientHeight;
console.log(docHeight);
}
displayDocumentSize();

----------------------------------------------------------

No comments:

Post a Comment