久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  1. <legend id='ichYl'><style id='ichYl'><dir id='ichYl'><q id='ichYl'></q></dir></style></legend>
  2. <small id='ichYl'></small><noframes id='ichYl'>

      <bdo id='ichYl'></bdo><ul id='ichYl'></ul>

      <tfoot id='ichYl'></tfoot>

      <i id='ichYl'><tr id='ichYl'><dt id='ichYl'><q id='ichYl'><span id='ichYl'><b id='ichYl'><form id='ichYl'><ins id='ichYl'></ins><ul id='ichYl'></ul><sub id='ichYl'></sub></form><legend id='ichYl'></legend><bdo id='ichYl'><pre id='ichYl'><center id='ichYl'></center></pre></bdo></b><th id='ichYl'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ichYl'><tfoot id='ichYl'></tfoot><dl id='ichYl'><fieldset id='ichYl'></fieldset></dl></div>

      有沒有一種簡單的方法可以確定用戶在哪個半球

      Is there an easy way to determine which hemisphere a user is in?(有沒有一種簡單的方法可以確定用戶在哪個半球?)
      <legend id='S9BYS'><style id='S9BYS'><dir id='S9BYS'><q id='S9BYS'></q></dir></style></legend>

          <bdo id='S9BYS'></bdo><ul id='S9BYS'></ul>
          1. <i id='S9BYS'><tr id='S9BYS'><dt id='S9BYS'><q id='S9BYS'><span id='S9BYS'><b id='S9BYS'><form id='S9BYS'><ins id='S9BYS'></ins><ul id='S9BYS'></ul><sub id='S9BYS'></sub></form><legend id='S9BYS'></legend><bdo id='S9BYS'><pre id='S9BYS'><center id='S9BYS'></center></pre></bdo></b><th id='S9BYS'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='S9BYS'><tfoot id='S9BYS'></tfoot><dl id='S9BYS'><fieldset id='S9BYS'></fieldset></dl></div>

            <small id='S9BYS'></small><noframes id='S9BYS'>

              <tbody id='S9BYS'></tbody>
            <tfoot id='S9BYS'></tfoot>

              • 本文介紹了有沒有一種簡單的方法可以確定用戶在哪個半球?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我正在開展一個包含季節性內容的項目,我們正在考慮確定用戶的位置,以確定適合他們的季節.這樣做的明顯方法是對他們的 IP 進行地理定位,然后獲取緯度.> 0 是北半球,<0 是南方.

                I'm working on a project which includes seasonal content, and we're thinking of determining the user's location to work out what season it is for them. The obvious way of doing this is to Geo-locate their IP, then grab the latitude. > 0 is Northern hemisphere, and < 0 is Southern.

                我很高興這樣做 - 雖然將 IP 精確定位到確切位置似乎有點浪費,只是為了確定它們在地球的哪一半 - 但我想我會扔掉它以防萬一有人有任何可能縮短流程的技巧.

                I'm happy to go that way - though it seems a bit of a waste to pinpoint an IP to an exact location, just to determine which half of the planet they're on - but I thought I'd throw it out there in case anyone has any tricks which might shortcut the process.

                請求標頭,可以在客戶端用 JS 提取的東西,很容易獲得 - 我只是認為它沒有任何幫助.

                Request headers, stuff that can be extracted with JS on the client, it's all easy enough to get - I just don't think any of it helps.

                推薦答案

                我先看看客戶的時鐘——如果客戶的日歷中存在夏令時,你可以判斷他是在赤道以北還是以南.

                I'd first check the client's clock- if daylight savings exists in the client's calendar, you can tell if he is north or south of the equator.

                如果沒有dst信息,可以使用geolocation,

                if there is no dst information, you can use geolocation,

                或者詢問用戶是否在赤道以南...

                or ask the user if he is south of the equator...

                window.whatHemisphere= (function(){
                    var y= new Date().getFullYear();
                    if(y.getTimezoneOffset()==undefined) return null;
                    var jan= -(new Date(y, 0, 1, 0, 0, 0, 0).getTimezoneOffset()),
                    jul= -(new Date(y, 6, 1, 0, 0, 0, 0).getTimezoneOffset()),
                    diff= jan-jul;
                    if(diff> 0) return 'N';
                    if(diff< 0) return 'S'
                    return null;
                })()
                

                這篇關于有沒有一種簡單的方法可以確定用戶在哪個半球?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Use IScroll in Angular 2 / Typescript(在 Angular 2/Typescript 中使用 IScroll)
                anime.js not working in Ionic 3 project(Anime.js 在 Ionic 3 項目中不起作用)
                Ionic 3 - Update Observable with Asynchronous Data(Ionic 3 - 使用異步數據更新 Observable)
                Angular 2: file not found on local .json file(Angular 2:在本地 .json 文件中找不到文件)
                In Ionic 2, how do I create a custom directive that uses Ionic components?(在 Ionic 2 中,如何創建使用 Ionic 組件的自定義指令?)
                Use ViewChild for dynamic elements - Angular 2 amp; ionic 2(將 ViewChild 用于動態元素 - Angular 2 amp;離子2)
                  <tfoot id='uDYae'></tfoot>

                  <i id='uDYae'><tr id='uDYae'><dt id='uDYae'><q id='uDYae'><span id='uDYae'><b id='uDYae'><form id='uDYae'><ins id='uDYae'></ins><ul id='uDYae'></ul><sub id='uDYae'></sub></form><legend id='uDYae'></legend><bdo id='uDYae'><pre id='uDYae'><center id='uDYae'></center></pre></bdo></b><th id='uDYae'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='uDYae'><tfoot id='uDYae'></tfoot><dl id='uDYae'><fieldset id='uDYae'></fieldset></dl></div>
                    <tbody id='uDYae'></tbody>
                  <legend id='uDYae'><style id='uDYae'><dir id='uDYae'><q id='uDYae'></q></dir></style></legend>

                    <small id='uDYae'></small><noframes id='uDYae'>

                          <bdo id='uDYae'></bdo><ul id='uDYae'></ul>
                          主站蜘蛛池模板: 亚洲精品视频在线 | 插插宗合网 | 久久久久久久久久久丰满 | 巨大荫蒂视频欧美另类大 | 亚洲免费影院 | 超碰免费在线 | 天天操夜夜爽 | 天天亚洲 | 国产成人免费视频网站视频社区 | 日韩黄色av | 天天拍天天操 | 国产一区二区三区四区五区加勒比 | 国产丝袜一区二区三区免费视频 | 亚洲成人中文字幕 | 久久久久国产一区二区三区不卡 | 一区二区三区日韩 | 日韩在线观看网站 | 久久国产区 | 九九热在线观看视频 | 国产一区二区三区色淫影院 | 最近中文字幕第一页 | 成人99 | 精品久久影院 | 亚洲一区二区三区四区av | 国产资源一区二区三区 | 中文字幕日韩欧美 | 黄色片在线看 | 国产乱码精品一区二区三区五月婷 | 欧美在线视频二区 | 日本免费在线观看视频 | 亚洲成av人片在线观看无码 | 国产九九av| 高清欧美性猛交 | www..com18午夜观看| 亚洲高清av在线 | 国产成年人视频 | 日韩高清中文字幕 | 欧美网站一区 | 99成人免费视频 | h视频在线免费 | 国产区精品在线观看 |