我做过for PPC的web,是用手写笔点的,不知道跟触摸屏差别大不大.不过开法过程没什么特别.

解决方案 »

  1.   

    有几个个办法你可以用document.activeElement可以获得当前活动的元素
    或者在那些输入框获得焦点的时候把自身的ID赋值给一个全局变量,失去焦点的时候清空那个全局变量
      

  2.   

    刚没考虑就瞎说的<?xml version="1.0" encoding="gb2312" standalone="no" ?>
    <!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" 
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <meta http-equiv="pragma" content="no-cache" />
    <link rel="stylesheet" type="text/css" href="/style/default.css" />
    <style type="text/css">
    <!--
    -->
    </style>
    <script language="JavaScript" src="/Script/Default.js"></script>
    <script language="JavaScript">
    <!--
    var g_id='';
    function s(v){
    if(g_id==''){
    alert('请选择一个文本框先');
    return false;
    }
    var p=document.getElementById(g_id);
    p.value+=v.toString();
    p.focus();
    }
    -->
    </script>
    <title></title>
    </head>
    <body>
    <table border="1" cellpadding="0">
    <tr>
    <td>
    1、<input type="text" onfocus="JavaScript:g_id=this.uniqueID;" />
    </td>
    <td rowspan="10">
    <input type="button" value=" 0 " onclick="JavaScript:s(0)" /><br />
    <input type="button" value=" 1 " onclick="JavaScript:s(1)" />
    <input type="button" value=" 2 " onclick="JavaScript:s(2)" />
    <input type="button" value=" 3 " onclick="JavaScript:s(3)" /><br />
    <input type="button" value=" 4 " onclick="JavaScript:s(4)" />
    <input type="button" value=" 5 " onclick="JavaScript:s(5)" />
    <input type="button" value=" 6 " onclick="JavaScript:s(6)" /><br />
    <input type="button" value=" 7 " onclick="JavaScript:s(7)" />
    <input type="button" value=" 8 " onclick="JavaScript:s(8)" />
    <input type="button" value=" 9 " onclick="JavaScript:s(9)" />
    </td>
    </tr>
    <tr>
    <td>
    2、<input type="text" onfocus="JavaScript:g_id=this.uniqueID;" />
    </td>
    </tr>
    <tr>
    <td>
    3、<input type="text" onfocus="JavaScript:g_id=this.uniqueID;" />
    </td>
    </tr>
    <tr>
    <td>
    4、<input type="text" onfocus="JavaScript:g_id=this.uniqueID;" />
    </td>
    </tr>
    <tr>
    <td>
    5、<input type="text" onfocus="JavaScript:g_id=this.uniqueID;" />
    </td>
    </tr>
    <tr>
    <td>
    6、<input type="text" onfocus="JavaScript:g_id=this.uniqueID;" />
    </td>
    </tr>
    <tr>
    <td>
    7、<input type="text" onfocus="JavaScript:g_id=this.uniqueID;" />
    </td>
    </tr>
    <tr>
    <td>
    8、<input type="text" onfocus="JavaScript:g_id=this.uniqueID;" />
    </td>
    </tr>
    <tr>
    <td>
    9、<input type="text" onfocus="JavaScript:g_id=this.uniqueID;" />
    </td>
    </tr>
    <tr>
    <td>
    10、<input type="text" onfocus="JavaScript:g_id=this.uniqueID;" />
    </td>
    </tr>
    </table>
    </body>
    </html>
      

  3.   

    eglic(圪圪) 能解释这个document.getElementById()方法?谢谢你解决,明天加给你80
      

  4.   

    getElementById()通过元素ID获得元素引用。
      

  5.   

    比如有 <div id=pp></div>
    可以通过document.getElementById("pp")得到div那个对象
    在IE下面可以直接document.pp来得到