Home > Web Front-end > JS Tutorial > js real-time acquisition of window size changes example code

js real-time acquisition of window size changes example code

高洛峰
Release: 2016-12-06 14:28:47
Original
1156 people have browsed it

As shown below:

$(window).resize(function(){
  var Height = $(window).height();
  var Width = $(window).width();
})
Copy after login

The above js example code for obtaining window size changes in real time is all the content shared by the editor


Related labels:
js
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template