查看文件: mrt_mobile.js
大小: 979 字节
类型: application/javascript
//手機 or電腦 if ( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { MapTop_mobile.style.display = "block"; } else { MapTop_web.style.display = "block"; } //旋轉 window.addEventListener("orientationchange",onOrientationchange ,false); function onOrientationchange() { //alert(window.orientation+'1'); if (window.orientation === 180 || window.orientation === 0) { //直式 //alert(window.orientation+'2'); MapTop_web.style.display = "none"; MapTop_mobile.style.display = "block"; // Map_mark.style.display="none"; //alert(window.orientation+'5'); } if (window.orientation === 90 || window.orientation === -90 ){ //橫式 // alert(window.orientation+'3'); MapTop_mobile.style.display = "none"; MapTop_web.style.display = "block"; // alert(window.orientation+'4'); } }
保存
取消
返回文件列表