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

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

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

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

      <legend id='Ui8rk'><style id='Ui8rk'><dir id='Ui8rk'><q id='Ui8rk'></q></dir></style></legend>

      每次用戶重新加載頁面時,讓 html5 地理定位請求

      Make html5 geolocation ask permission every time user reloads the page(每次用戶重新加載頁面時,讓 html5 地理定位請求權(quán)限)
      <tfoot id='1akKN'></tfoot>
          <tbody id='1akKN'></tbody>

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

              <small id='1akKN'></small><noframes id='1akKN'>

              <legend id='1akKN'><style id='1akKN'><dir id='1akKN'><q id='1akKN'></q></dir></style></legend>
              1. 本文介紹了每次用戶重新加載頁面時,讓 html5 地理定位請求權(quán)限的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我們?yōu)槭裁葱枰?

                我們的網(wǎng)站中有一些頁面允許用戶輸入一些數(shù)據(jù)并搜索他們所在地區(qū)的其他客戶.當(dāng)用戶打開該頁面時,必須顯示彈出消息

                We have some page in our website which allows users to enter some data and search for another customers in their area. When user opened that page the popup message must be shown

                http://foo.bar.com想使用您當(dāng)前的位置.

                之后,用戶可以放棄它并手動填寫位置字段或接受并自動重定向到結(jié)果頁面.

                After that user can discard that and fill the location fields manually or accept and be automatically redirected to results page.

                問題:

                問題是當(dāng)用戶第一次選擇任何提到的選項時,瀏覽器會記住它并且下次不會再詢問它.因此,當(dāng)用戶接受它時,每次他打開搜索頁面時,它都會自動將他重定向到結(jié)果頁面,而無需詢問任何內(nèi)容.

                The problem is that when user selects any of the mentioned options at first time, browser remembers it and don't ask it next time. So when user accept it, every time he open the search page it will automatically redirect him to results page withous asking anything.

                代碼:

                我們使用的是基本的 html5 地理位置代碼

                We are using basic html5 geolocation code

                if (navigator.geolocation) {
                   navigator.geolocation.getCurrentPosition(LocationMethod);
                } 
                

                結(jié)論:

                我很確定不可能更改瀏覽器原生的權(quán)限.但我希望有人會為這個問題提供很好的解決方案.謝謝.

                I'm pretty sure that it's impossible to change permission that are browser-native. But I hope that someone will give nice solution for this problem. Thanks.

                推薦答案

                一旦用戶點擊拒絕/允許,瀏覽器就會為網(wǎng)站記住這個決定.

                once a user clicks deny/allow the browser remembers this decision for the site.

                避免拒絕的最佳方法是僅在用戶單擊表示他想使用其位置的內(nèi)容時調(diào)用 getCurrentPosition(...).然后他可能會很樂意分享它:)

                the best way to avoid a deny is to only call getCurrentPosition(...) when the user clicked something that means he wants to use his location. and then he would probably be glad to share it :)

                foursquare 網(wǎng)站就是一個很好的例子.進入后,您可以前往某個城市的地圖,并且只有通過單擊地圖上的使用我的位置"按鈕,它才會提示您.

                A good example is on foursquare site. on entering it offers you to go to the map to some city, and only there by clicking the button on the map of "use my location" it prompts for it.

                如果您被拒絕該位置,您還可以顯示一條信息消息您過去曾拒絕此站點的位置服務(wù),請啟用它做 bla bla bla".隨便填bla bla bla.

                If you are denied the location you could also show an info message with "you have denied location service in the past for this site, do enable it do bla bla bla". and fill in the bla bla bla with whatever.

                這篇關(guān)于每次用戶重新加載頁面時,讓 html5 地理定位請求權(quán)限的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關(guān)文檔推薦

                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 - 使用異步數(shù)據(jù)更新 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 中,如何創(chuàng)建使用 Ionic 組件的自定義指令?)
                Use ViewChild for dynamic elements - Angular 2 amp; ionic 2(將 ViewChild 用于動態(tài)元素 - Angular 2 amp;離子2)
              2. <tfoot id='g5XbP'></tfoot>
              3. <i id='g5XbP'><tr id='g5XbP'><dt id='g5XbP'><q id='g5XbP'><span id='g5XbP'><b id='g5XbP'><form id='g5XbP'><ins id='g5XbP'></ins><ul id='g5XbP'></ul><sub id='g5XbP'></sub></form><legend id='g5XbP'></legend><bdo id='g5XbP'><pre id='g5XbP'><center id='g5XbP'></center></pre></bdo></b><th id='g5XbP'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='g5XbP'><tfoot id='g5XbP'></tfoot><dl id='g5XbP'><fieldset id='g5XbP'></fieldset></dl></div>

                  <tbody id='g5XbP'></tbody>

                  <bdo id='g5XbP'></bdo><ul id='g5XbP'></ul>
                  <legend id='g5XbP'><style id='g5XbP'><dir id='g5XbP'><q id='g5XbP'></q></dir></style></legend>

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

                        • 主站蜘蛛池模板: 国产精品色综合 | 欧美成人一区二区三区 | 四虎影院在线观看免费视频 | 美女拍拍拍网站 | 久久久www成人免费无遮挡大片 | 超碰97人人人人人蜜桃 | 日本亚洲一区 | 日日夜夜免费精品 | 国产精品久久久久久亚洲调教 | 日韩在线免费视频 | 黄色电影在线免费观看 | 欧美成人精品激情在线观看 | 一级片免费视频 | 中文字幕国产在线 | 国产91丝袜在线熟 | 国产视频久久 | 欧美成人第一页 | 免费电影av | 日韩国产精品一区二区三区 | 97在线观视频免费观看 | 国产福利观看 | 国产91亚洲精品一区二区三区 | 国产精品久久久久久久一区二区 | 久久久精品一区二区三区 | 国产一二三视频在线观看 | 国产精品区二区三区日本 | 一区二区三区亚洲 | 99热国产免费 | 国产免费观看久久黄av片涩av | 午夜男人免费视频 | 成人欧美一区二区三区 | 日韩av看片 | 自拍偷拍亚洲一区 | 久久精品国产一区二区电影 | 亚洲国产欧美国产综合一区 | 日韩精品一区二区三区在线播放 | 欧美日韩国产精品 | 人人草天天草 | 国产精品自拍一区 | 国产激情一区二区三区 | 精品免费国产一区二区三区 |