Search
 
SCRIPT & CODE EXAMPLE
 

HTML

html get user screen resolution

function getResolution() {
  const realWidth = window.screen.width * window.devicePixelRatio;
  const realHeight = window.screen.height * window.devicePixelRatio;
  console.log(`Your screen resolution is: ${realWidth} x ${realHeight}`);
}

// test
getResolution();
// Your screen resolution is: 3840 x 2160

Comment

PREVIOUS NEXT
Code Example
Html :: vue js v-for array index 
Html :: html put newline in text with  
Html :: how to block futer date input 
Html :: change the font-size on a label css 
Html :: jquery unescape html 
Html :: html underline tag 
Html :: remove extra whitespace in pre html 
Html :: onclick button how to import file upload using dialog in html 
Html :: load image file from input in html 
Html :: picture element html 
Html :: common sample sql databases for practice 
Html :: simple program of html 
Html :: input hidden selected 
Html :: Tailwind CSS timeline 
Html :: http header server syntax 
Html :: button in html 
Html :: embed png in html 
Html :: html elements list explained 
Html :: search button inside search box 
Html :: html = sign 
Html :: html table to pdf jquery 
Html :: boarder color of type text 
Html :: html inline label 
Html :: safe and truncate in django template 
Html :: How to include two pictures side by side in Markdown for Jupyter Notebook 
Html :: how to use variables in html 
Html :: accordion bootstrap 4 
Html :: mobile menu bootstrap 
Html :: tailwind button example 
Html :: add title attribute 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =