日期:2014-05-18 浏览次数:20375 次
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Testerror.aspx.vb" Inherits="Testerror" %> <!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"> <head runat="server"> <title>Test</title> <script type="text/javascript"> function cellkeydown(event) { if (event.ctrlKey && event.keyCode == 86) { var ss = document.getElementById("TextArea1"); ss.focus(); ss.select(); // 等50毫秒,keyPress事件发生了再去处理数据 setTimeout("dealwithData()", 50); } } function dealwithData(event) { var ss = document.getElementById("TextArea1"); alert(ss.value); ss.blur(); } </script> </head> <body onkeydown="return cellkeydown(event)"> <textarea id="TextArea1" name="TextArea1"></textarea> </body> </html>