Answers for "the length and width in js"

1

how to get width in javascript

int screenHeight = screenSize.height;
int screenWidth = screenSize.width;
Posted by: Guest on September-10-2020
0

width and height in js

const heightOutput = document.querySelector("#height");
const widthOutput = document.querySelector("#width");

function resizeListener() {
  heightOutput.textContent = window.innerHeight;
  widthOutput.textContent = window.innerWidth;
}

window.addEventListener("resize", resizeListener);
Posted by: Guest on April-16-2022

Code answers related to "the length and width in js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language