[JavaScript] javascript根据iphone屏幕方向调用不同的样式表 →→→→→进入此内容的聊天室

来自 , 2021-03-23, 写在 JavaScript, 查看 105 次.
URL http://www.code666.cn/view/cd42c963
  1. <script type="text/javascript">  
  2.  function orient()  
  3.  {  
  4.      switch(window.orientation){    
  5.              case 0: document.getElementById("orient_css").href = "css/iphone_portrait.css";  
  6.              break;  
  7.  
  8.              case -90: document.getElementById("orient_css").href = "css/iphone_landscape.css";  
  9.              break;  
  10.  
  11.              case 90: document.getElementById("orient_css").href = "css/iphone_landscape.css";  
  12.              break;  
  13.  
  14.  }  
  15.  
  16.  window.onload = orient();  
  17.  
  18.  
  19.  </script>
  20. //javascript/3908

回复 "javascript根据iphone屏幕方向调用不同的样式表"

这儿你可以回复上面这条便签

captcha