<script src="http://www.geoplugin.net/javascript.gp"></script>
<label for="country">Country</label>
<select id="country" name="country">
<option value="" selected></option>
</select>
<br />
<label for="zone">Region</label>
<select id="zone" name="zone">
<option value="" selected></option>
</select>
<br />
<label for="district">City</label>
<select id="district" name="district">
<option value="" selected></option>
</select>
<script type="text/javascript">
jQuery(document).ready(function ($) {
//alert("Your location is: " + geoplugin_countryName() + ", " + geoplugin_region() + ", " + geoplugin_city());
var country = geoplugin_countryName();
$("#country").append("<option value='1' selected>" + country + "</option>");
var zone = geoplugin_region();
$("#zone").append("<option value='1' selected>" + zone + "</option>");
var district = geoplugin_city();
$("#district").append("<option value='1' selected>" + district + "</option>");
});
</script>
Smoga Cara mengetahui lokasi alamat kita menggunakan Jquery dan Javascript di atas bermanfaat bagi pemirsa semua....!
ConversionConversion EmoticonEmoticon