js orientationchange事件在获取页面宽高时出错

时间:2025-03-28 14:46:41
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <script src="///eruda/1.2.2/"></script> <script> (); </script> </head> <body> <script> ('orientationchange', function () { setTimeout(function () { var page_w = ; var page_h = ; (page_w, page_h); },200); }); // ('resize', function () { // var page_w = ; // var page_h = ; // (page_w, page_h); // }); </script> </body> </html>