How can I make a simple on-screen HTML keyboard that contains only two buttons and one textbox?
Example
On screen keyboard
But i want to design keyboard using only two buttons that will contain value 0 and 1 like this and v开发者_开发知识库alue should come in textbox
Can anyone tell me how can i do this ?
sample html:
<input type="text" id="theTextField">
<div id="button0">0</div>
<div id="button1">1</div>
sample jquery:
var $yourTextField = $('#theTextField');
$('#button0').click(
function(){
$yourTextField.val($yourTextField.val()+"0")
}
)
$('#button1').click(
function(){
$yourTextField.val($yourTextField.val()+"1")
}
)
精彩评论