Javascript examples for Browser Object Model:Navigator
Call function when user Allows or Denies access to "Physical Location"
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.3.js"></script> <script type="text/javascript"> $(window).load(function(){/*from w w w . j a v a 2s.c om*/ navigator.geolocation.getCurrentPosition(function(position) { console.log('allow'); }, function() { console.log('deny'); }); }); </script> </head> <body> </body> </html>