2012-2-11 23:31:40 阅读119 评论8 112012/02 Feb11
2011-12-15 14:57:35 阅读27 评论0 152011/12 Dec15
function htmlEscape(text){
return text.replace(/[<>"&]/g,function(match){
switch(match){
case '<':
return "<";
case '>':
return ">";
case '&':
return "&";
case '\"':
return """;
}
});
}
var str = htmlEscape('<input type="text" />');
console.log(str);
var str = 'a b c#d';
2011-12-6 11:02:56 阅读48 评论0 62011/12 Dec6
var $ = jQuery = window.jQuery = function(){
return new jQuery.fn.init();
}2011-11-5 20:24:16 阅读52 评论5 52011/11 Nov5
2011-11-5 10:14:18 阅读44 评论0 52011/11 Nov5
<!DOCTYPE HTML
2011-10-23 17:22:40 阅读28 评论0 232011/10 Oct23
2011-10-8 14:57:40 阅读41 评论4 82011/10 Oct8
2011-10-2 21:52:51 阅读31 评论1 22011/10 Oct2
2011-9-19 12:32:55 阅读46 评论1 192011/09 Sept19
2011-9-18 10:52:40 阅读30 评论0 182011/09 Sept18