使用SendMessage函数来发相应的消息.

解决方案 »

  1.   

    用API,具体的给你切出来瞧瞧吧:VOID keybd_event(
        BYTE bVk, // virtual-key code
        BYTE bScan, // hardware scan code
        DWORD dwFlags, // flags specifying various function options
        DWORD dwExtraInfo  // additional data associated with keystroke
       ); ParametersbVkSpecifies a virtual-key code. The code must be a value in the range 1 to 254. bScanSpecifies a hardware scan code for the key. dwFlagsA set of flag bits that specify various aspects of function operation. An application can use any combination of the following predefined constant values to set the flags: Value Meaning
    KEYEVENTF_EXTENDEDKEY If specified, the scan code was preceded by a prefix byte having the value 0xE0 (224).
    KEYEVENTF_KEYUP If specified, the key is being released. If not specified, the key is being depressed.
     dwExtraInfoSpecifies an additional 32-bit value associated with the key stroke.  Return ValuesThis function has no return value. ResAlthough keybd_event passes an OEM-dependent hardware scan code to Windows, applications should not use the scan code. Windows converts scan codes to virtual-key codes internally and clears the up/down bit in the scan code before passing it to applications. 
    An application can simulate a press of the PRINTSCREEN key in order to obtain a screen snapshot and save it to the Windows clipboard. To do this, call keybd_event with the bVk parameter set to VK_SNAPSHOT, and the bScan parameter set to 0 for a snapshot of the full screen or set bScan to 1 for a snapshot of the active window. 
      

  2.   

    描述的不清楚,
    是在该页面里面有个键盘么?
    如果全是web的形式,用javascript不就可以了?