Im trying to simulate a interf开发者_Go百科ace from a touchscreen phone, one function of the app is to allow to search but i want the user only to be able to click on the buttons on the virtual keyboard i'll be displaying and not be able to use the pc keyboard. How can i accomplish that?
Make the input readonly (to disallow keyboard input) by using the readonly attribute docs..
<input id="someid" value="initial" readonly type="text" />
you can still alter the value of it with javascript.
example: http://jsfiddle.net/XBxj6/
精彩评论