I just don't want the site change orientation when iPhone change orientation.
Is it possible?
I just don't want the site change orientation when iPhone change orientation.
Is it possible?
You can't prevent this via JavaScript, it's browser controlled...and really you'd be breaking the user's expectations of behavior if you could do this, which is hardly ever a good thing.
Also if you could, which orientation would the user be in? When they arrived on your site the phone could have been in either orientation.
See this answer for how to use CSS/JS to rotate the rendered display on orientation change. The idea is to capture the orientation event, and then force the display back to portrait/landscape.