- 显示日期的时候,单数加上零
- 加上快捷键
- 打开表单自动聚焦
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Node.js IL Chat</title> | |
<script type="text/javascript" src="/jquery-1.6.4.min.js"></script> | |
<script type="text/javascript" src="/socket.io/socket.io.js"></script> | |
<script language="javascript"> | |
var socket; | |
$(document).ready(function() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Node.js IL Chat</title> | |
<script type="text/javascript" src="/jquery-1.6.4.min.js"></script> | |
<script type="text/javascript" src="/socket.io/socket.io.js"></script> | |
<script language="javascript"> | |
var socket; | |
$(document).ready(function() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write com.apple.appstore ShowDebugMenu -bool true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.submiting { | |
position:relative; | |
text-indent: -110026px; | |
background:#5ba4e5; | |
&:before{ | |
content: ""; | |
position: absolute; | |
width: 6px; | |
height: 6px; | |
border: 4px solid rgba(0,0,0,.2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// returns true if the element or one of its parents has the class classname | |
function hasSomeParentTheClass(element, classname) { | |
if (element.className.split(' ').indexOf(classname)>=0) return true; | |
return element.parentNode && hasSomeParentTheClass(element.parentNode, classname); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cloneImg (elem) { | |
var imgNode = document.createElement("div"); | |
var attributes = elem.attributes; | |
for (var i in attributes) { | |
if(!attributes.hasOwnProperty(i)) { | |
continue; | |
} | |
var attr = attributes[i]; | |
if(attr.name == 'class') { | |
imgNode.className = attr.value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
然后把范围扩大到^[\u2E80-\u9FFF]+$, 这样倒是都通过了, 这个应该就是匹配中日韩文字的正则表达式了, 包括我們臺灣省還在盲目使用的繁體中文 | |
而关于中文的正则表达式, 应该是^[\u4E00-\u9FFF]+$, 和论坛里常被人提起的^[\u4E00-\u9FA5]+$很接近 | |
这里是几个主要非英文语系字符范围 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getStringMemorySize(_string) { | |
"use strict"; | |
var codePoint, accum = 0; | |
for (var stringIndex = 0, endOfString = _string.length; stringIndex < endOfString; stringIndex++) { | |
codePoint = _string.charCodeAt(stringIndex); | |
if (codePoint < 0x100) { | |
accum += 1; | |
continue; | |
} |
NewerOlder