弹出窗中的输入项获取焦点时,如果输入框中有内容,将光标定位到文字结尾。
开发的时候没有注意,直接focus了一下,结果被测试追杀了好久... 获取输入框中光标位置:function getCursorPos(ctrl){ var
pos = 0; if(document.selectio...
分类:
其他好文 时间:
2014-05-26 16:10:13
阅读次数:
254
1:static:定义静态方法和属性,也可以用于定义静态变量以及后期静态变量2:extends:继承
例:\n" ; } } //儿子继承父亲类 class Bextends A { function example (){ e...
分类:
Web程序 时间:
2014-05-26 14:54:02
阅读次数:
250
1 //工厂模式 2 function createPerson (name, age, job){
3 var o = new Object(); 4 o.name = name; 5 o.age = age; 6 o.jo...
分类:
Web程序 时间:
2014-05-26 14:48:09
阅读次数:
242
JavaScript的Date对象有容错性,可将随意给定的日期的年月日自动生成正确的日期时间//JavaScript中Date对象容错性function
dateCheck(){ var date = new Date(); date.setDate(date.getDate()+13)...
分类:
编程语言 时间:
2014-05-26 13:31:03
阅读次数:
198
上回开了个头,简单的介绍了Emacs的一些基本常识,这回继续说基本常识,怎么移动你的光标。可能有人会说,这上下左右键不是很好用吗,还用你来讲。呶,Emacs的强大在于你能够只使用键盘左边那堆键来完成任何事情(不包括顶上的ESC和Function),这也是Emacs的设计宗旨。
为了试验这些按...
分类:
其他好文 时间:
2014-05-26 13:30:29
阅读次数:
298
This post introduces how to use the ===, eval,
Function() carefully.
分类:
编程语言 时间:
2014-05-26 12:46:27
阅读次数:
292
1 function shengchen() { 2 var arrTR =
$("#tbModule").children(); 3 var Context=""; 4 $("#tbModule").find("tr")...
分类:
Web程序 时间:
2014-05-26 12:41:49
阅读次数:
399
转载自http://www.educity.cn/java/671094.html一、常见的字符串处理函数 // 返回字符的长度,一个中文算2个
String.prototype.ChineseLength = function() { return this .replace( / [ ^ \x0...
分类:
Web程序 时间:
2014-05-26 11:56:32
阅读次数:
275
GetMessage Function:BOOL GetMessage( LPMSG lpMsg,
HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax);消息循环:MSG msg;whil...
分类:
编程语言 时间:
2014-05-26 10:51:13
阅读次数:
257
String.prototype.format = String.prototype.f =
function () { var s = this, i = arguments.length; while (i--) { s =
s.replace(new R...
分类:
编程语言 时间:
2014-05-26 10:49:23
阅读次数:
356