-
var previous;
-
$("select").focus(function () {
-
// Store the current value on focus, before it changes
-
previous = this.value;
-
}).change(function() {
-
// Do something with the previous value after the change
-
alert(previous);
- });
-
parseFloat(num).toFixed(2);
-
//or
- Math.round(num * 100) / 100