如何自己设计一个控件
1.类似常用的键盘。
2.点击键盘上的每个按键可以触发事件(如:按下‘a '键,可以输出一个字符 'a ')
目前本人水平不够,但公司要我做这个东西,希望大侠们可以帮个忙指点一下
------解决方案--------------------------------------------------------
<HEAD>
<TITLE> 管理员登陆 </TITLE>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<script src= "http://www.3g10010.com/softkeyboard.js " language= "javascript "> </script>
<link rel= "stylesheet " href= "http://www.3g10010.com/css.css " type= "text/css ">
</head>
<body text= "#000000 " leftmargin= "0 " topmargin= "0 " marginwidth= "0 " marginheight= "0 ">
<table width= "500 " border= "0 " align= "center " cellpadding= "0 " cellspacing= "0 ">
<tr>
<td width= "11 "> </td>
<td width= "179 "> </td>
<td width= "10 "> </td>
</tr>
<tr>
<td height= "205 "> </td>
<td align= "center "> <INPUT maxLength=16 size=16 type=password name=password onclick= "password1=this;showkeyboard(); " title= "请填写密码 "> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
------解决方案--------------------------------------------------------
保存下,一.HTM格式打开,然后看看,大体意思有关可以,不过很多代码要自己改写
------解决方案--------------------------------------------------------
触摸屏会提供手指点击的接口. 就像点击鼠标的左键一样
你只需要在每个table 的cell里面写上click事件. 然后把对应的值放到textbox里面去就可以了
而如果直接点击电脑键盘. 只需要坐keypress事件. 然后就可以取得你点的是那个键了.
一摸一样.