<script>
function testar() {
if (navigator.geolocation) {
alert("Este navegador suporta a funcionalidade Geolocation");
/* Faça alguma coisa com Geolocation */
} else {
alert("Este navegador não suporta a funcionalidade Geolocation");
}
}
</script>
<p><input type=button value="Clique para testar" onclick="testar()"></p>