ajax,
javascript,
onkeypress,
php
onkeyup with javascript like ajax
onkeyup with javascript like ajax
Sample Code:
...................................................................................................................................................................<script>
function balance(str) { var val = str;
// this fucntion reduce the value by 100 and show the result in result text box
var result = 100 - val;
document.getElementById("bal_show").value =result;
}
</script>
...................................................................................................................................................................
<div class="first">
<label for="">balance</label>
//onkeyup() function is used to send the each value to that function on every key press
<input type="text" id="receipt" onkeyup="balance(this.value)">
<label for="">result</label>
//here is the result textbox this ll show the balance without any submit button or without any action //like ajax.
<input type="text" id="bal_show" >
</div>
...................................................................................................................................................................
...................................................................................................................................................................
0 comments