javascript - Create own numpad with inputs -
i've been searching web tips regarding how make own numpad, created html code, act numpad on computer.
i have numpad on website give input textfield in same div. i've given value each button , guess have create more numbers add text field.
i'm beginner programming maybe easy. help!
you it, alternatively, jquery. jquery better imho if need simple easy solution (jquery easier , faster).
html:
<div id="mydiv"> </div> //the div add text <div id="buttoncontainer"> //this div containing numbers (the numpad) <button value="one"> 1 </button> <button value="two"> 2 </button> </div>
jquery:
$("#buttoncontainer button").click(function() { $("#mydiv").append($(this).val()); });
what is: when click button inside div id of 'buttoncontainer', adds value div id of "mydiv".
on javascript subject, if want guide: http://javascript.info/
Comments
Post a Comment