Nov 19, 2014

Simple JQuery Example To Convert Miles To Km And Km To Miles

Simple JQuery Example To Convert Miles To Km And Km To Miles

Simply Pass The Values To The Respective Functions Below


<script type="text/javascript">

function m2k (miles) {
    var mi = parseFloat(miles);
    var km = "";
    if (!isNaN(mi)) km = mi * 1.609344;
alert(km);
}

function k2m (kilometers) {
    var km = parseFloat(kilometers);
    var mi = "";
    if (!isNaN(km)) mi = km * 0.621371192;
         alert(mi);
}
</script>

No comments:

JWT Token Decode Using Jquery

When it come to authentication we use many mechanism. Ones the user authenticated we must keep these details somewhere safe. So we can share...