当前位置:网站首页>JS to get the screen size, current web page and browser window
JS to get the screen size, current web page and browser window
2022-06-23 21:02:00 【User 1349575】
jQuery
If you are using jQuery, You can use jQuery Method to get a window or document Size :
/** * Time :2019 year 8 month 18 Japan * Front end tutorial : https://www.pipipi.net/ */ $(window).height(); // returns height of browser viewport $(document).height(); // returns height of HTML document (same as pageHeight in screenshot) $(window).width(); // returns width of browser viewport $(document).width(); // returns width of HTML document (same as pageWidth in screenshot)
The screen size
For screen size you can use the following code :
/** * Time :2019 year 8 month 18 Japan * Front end tutorial : https://www.pipipi.net/ */ screen.height; screen.width;
边栏推荐
- 【Golang】使用Go语言操作etcd——配置中心
- How to handle the prompt that DNS is incorrect when adding resolution to Tencent cloud?
- JS delete object attribute
- How to convert []byte to io. in go Reader?
- Summary of multiple methods for obtaining the last element of JS array
- Newbeecoder. UI new open source control library DataGrid instructions
- Fortress deployment server setup operation guide for novices
- Is it safe for Huatai Securities to open an account online for securities companies with low handling fees and commissions
- 同花顺网上开户安全吗,佣金高不高
- Is it safe to open an online securities account or to go to the business department
猜你喜欢

Applet development framework recommendation
Implementing MySQL fuzzy search with node and express

3000 frame animation illustrating why MySQL needs binlog, redo log and undo log

Use of the vs2022scanf function. An error is reported when using scanf - the return value is ignored: Solutions
Application of JDBC in performance test

Yaokui tower in Fengjie, Chongqing, after its completion, will be the safety tower for Sichuan river shipping with five local scholars in the company

FPGA based electromagnetic ultrasonic pulse compression detection system paper + source file

JS advanced programming version 4: generator learning
随机推荐
Process injection
Memory patch amsi bypass
Spend small money to do big things: cloud function + cloud development leverages the practice of e-commerce promoting flexible architecture in CCTV evening party
网上证券开户安全还是去营业部安全
Customize view to imitate today's headlines and like animation!
[golang] how to realize real-time hot update of Go program
What are the server host security risks? How to prevent safety risks?
Summary of multiple methods for obtaining the last element of JS array
Yukeng MySQL service installation error
Why is it invalid to assign values to offsetwidth and offsetHeight
How do I view the server when I log in to the fortress machine? Operation guide for novice
国内期货开户怎么开?哪家期货公司开户更安全?
Use of paging components in fusiondesign
JS naming conventions
. Net Core 3. X MVC built-in log extension log4net
实现vscode写markdown文档+图片自动上传至腾讯云cos
【Golang】快速复习指南QuickReview(八)——goroutine
What is the role of computer auto audit audio? What content failed to pass the audit?
Want to open an account, is it safe to open an account on the stock Internet? Will the funds be cheated away?
ntpupdate. tencentyun. Com has been eliminated