寻她模板站 ┃ 精美源于细节,细节造就成功。
繁体中文    广告服务
百度搜藏    加入收藏
业务咨询
您的位置: 首页 >> 网站建设教程 >> 超级实用的几种表单校验效果收集
超级实用的几种表单校验效果收集 (12)
更新时间:2008-07-17 10:03:20  作者:admin  来源:互联网  浏览次数:82  文字大小:【】【】【
简介:只能是写限定的东西 程序代码: ENTER键可以让光标移到下一个输入框 <input onkeydown='if(event.keyCode==13)event.keyCode=9' > 只能是中文<input onkeyup='value=value.replace(/[ -~]/g,'')' onkeyd ...
    '>

// Coded by windy_sk <windy_sk@126.com> 20040205


function reportError(msg,url,line) {

var str = 'You have found an error as below: \n\n';

str += 'Err: ' + msg + ' on line: ' + line;

alert(str);

return true;

}


window.onerror = reportError;

 

document.onkeydown = function() {

if(event.ctrlKey){

switch(event.keyCode) {

case 82: //r

runcode();

break;

case 83: //s

savecode();

break;

case 71: //g

goto(prompt('Please input the line number', '1'));

break;

case 65: //a

document.execCommand('SelectAll');

break;

case 67: //c

document.execCommand('Copy');

break;

case 88: //x

document.execCommand('Cut');

break;

case 86: //v

document.execCommand('Paste');

[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27]