简体   繁体   中英

HTML5 Geolocation API not working in firefox

I try to execute the W3schools code to get the latitude and longitude via the HTML5 Geolocation API. It works in chrome except in firefox.

Here is the link of W3schools code: Geolocation try it .

By googling, the suggestion i found is to run firefox in admin mode in windows. I tried, but it's not working.

My firefox version is 57.0.4.

Do you have any idea why the geolocation API not working in firefox?

I just tried it on my localhost ,it's working for me,when i clicked that button firefox asked me to allow location access ,make sure you have also alowed location access .

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM