开发者

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

How can I make a simple on-screen HTML keyboard that contains only two buttons and one 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")
    }
)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜