How does the mobile end force the page to landscape?

now I am working on a game landing page with a 1200-high picture in the background, which is not high enough to fill the screen when placed on the phone. I hope to be able to force the horizontal screen when the phone is turned on.

method I found:

/ / determine screen orientation
if (window.orientation==90 | | window.orientation==-90) {

alert("")

}

/ / listen for screen orientation
window.onorientationchange = function () {

switch(window.orientation){ 
    case -90: 
    case 90: 
        alert(":" + window.orientation);
    case 0: 
    case 180: 
         alert(":" + window.orientation);
    break; 
} 

}

but after testing, I found that window.orientation has been abandoned. Is there any other way to do it?

Mar.07,2021

in the rotation event, the width-height pixel value is compared, and the width-to-height ratio is the horizontal screen

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e8e4e4-11c5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e8e4e4-11c5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?