jjzjj

lockOrientation

全部标签

javascript - screen.lockOrientation 不是函数

我想在Chrome中使用Js中的API屏幕。if(navigator.userAgent.match(/(android|iphone)/gi)){if('orientation'inscreen){//console.log('//APIsupported,yeah!');//console.log('neworientationis',screen.orientation);screen.lockOrientation('landscape');}else{console.log('//APInotsupported');}}else{//alert('none');}我的错误js