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

js real-time acquisition of window size changes example code

高洛峰
高洛峰Original
2016-12-06 14:28:471126browse

As shown below:

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

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


Statement:
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