I have created a number keypad using javascript. On each button click i have done the below:- Buttons are:-
<input type="button" value="2" class="num-key" onclick="insertvalue(this.value)">
<input type="button" value="3" class="num-key" onclick="insertvalue(this.value)">
<input type="button" value="4" class="num-key" onclick="insertvalue(this.value)">
the method is:-
function insertvalue(value)
{
document.getElementById('number').value=document.getElementById('number').value + value;
}
It is working but it is to slow. If i will do this using jquery it might be fast. But i have done this using jquery
$( ".num-key" ).click(function() {
$(".num-text").val($(this).val());
});
But it is not working please tell me how to do this.