һ
 ע

QQ¼

ֻһٿʼ

ƼĶ

+
̳ WEBҳǰ뿪 ǰ̨ű

ֻPCվԶתֻվ

[]
27780 websjy 2017-3-22 14:32:14
| ʾȫ¥
1F

ϵ½עᣬύѣø๦ܣϴزIJޣ

Ҫ ¼ ſػ鿴ûʺţע  

x

4GʱֻվѾdzձˣһֻվһʣ m.websjy.com ֱֻӷ   www.websjy.com PCվֻ԰վdzá

ֻܹPC˵վԶתֻվͺˣ

£

´ҳ


  1. <SCRIPT LANGUAGE="JavaScript">
  2. function mobile_device_detect(url)
  3. {
  4.         var thisOS=navigator.platform;
  5.         var os=new Array("iPhone","iPod","iPad","android","Nokia","SymbianOS","Symbian","Windows Phone","Phone","Linux armv71","MAUI","UNTRUSTED/1.0","Windows CE","BlackBerry","IEMobile");
  6. for(var i=0;i<os.length;i++)
  7.         {
  8. if(thisOS.match(os[i]))
  9.         {  
  10.   window.location=url;
  11. }
  12.          
  13. }
  14. //Ϊ൱ֵֻϵͳ֪Ϣ,ʱ
  15. if(navigator.platform.indexOf('iPad') != -1)
  16.         {
  17.   window.location=url;
  18. }
  19. //һΪAndroidֻںҲLinux
  20. //navigator.platformʾϢͬ,˴֣navigator.appVersionϢж
  21.   var check = navigator.appVersion;
  22.   if( check.match(/linux/i) )
  23.           {
  24.    //X11UCƽ̨ ҲԸ
  25.    if(check.match(/mobile/i) || check.match(/X11/i))
  26.                  {
  27.    window.location=url;
  28.    }
  29. }
  30. //in_array
  31. Array.prototype.in_array = function(e)
  32. {
  33.   for(i=0;i<this.length;i++)
  34.   {
  35.    if(this[i] == e)
  36.    return true;
  37.   }
  38.   return false;
  39. }
  40. }
  41. mobile_device_detect("http://m.websjy.com");
  42. </SCRIPT>
ƴ

ڶе http://m.websjy.com Ҫתַֻ


һֱȽϼ򵥵JS룬ҲԵ

  1. <script type="text/javascript">
  2. try {
  3. var urlhash = window.location.hash;
  4. if (!urlhash.match("fromapp"))
  5. {
  6. if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i)))
  7. {
  8. window.location="http://m.websjy.com";
  9. }
  10. }
  11. }
  12. catch(err)
  13. {
  14. }
  15. </script>
ƴ


  1. <script type="text/javascript">
  2. // JavaScript Document
  3. function urlredirect() {
  4.     var sUserAgent = navigator.userAgent.toLowerCase();
  5.     if ((sUserAgent.match(/(ipod|iphone os|midp|ucweb|android|windows ce|windows mobile)/i))) {
  6.         // PCתƶ
  7.         var thisUrl = window.location.href;
  8.         window.location.href = thisUrl.substr(0,thisUrl.lastIndexOf('/')+1)+'mobile/';
  9.     }
  10. }
  11. urlredirect(<span style="line-height: 1.5;">"http://m.websjy.com"</span><span style="line-height: 1.5;">);</span>
ƴ


ֻ, վ
Դ΢http://weibo.com/techued Դ΢Źںţweb-tech
ʹõ ٱ ظ
б

ֹ

²

̳¡ͼƬѷϴվԭתԻ,µİȨԭ
վַİȨ֪ͨǵĹԱ,Ա(Email:admin@websjy.com)ʱȡȨɾ
ܾκκʽڱ̳л񹲺͹ִ!

QQ| 42011102000510|Archiver|ֻ|Դ ( ICP14013341-1

GMT+8, 2017-12-13 23:52

Powered by Discuz! X3.2

ԴԴվ  ԴAPPӦ֮

ٻظ ض б