Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javascript ¿çä¯ÀÀÆ÷µÄʼþϵͳ2

»º´æϵͳÎÒÒÔÇ°ÔÚ²©¿Íд¹ýÁË£¬´ËºóÎÒ¶ÔjavascriptµÄÕÜѧ·¢ÉúºÜ´óµÄ¸Ä±ä¡£ÒÔÇ°ÊǾ¡Á¿±ÜÃâ¶ÔÔ­ÐͽøÐÐÀ©Õ¹µÄ£¬µ«·´¹ýÀ´Ò»Ï룬ÓÐʲô¹Øϵ£¿³ý·ÇÊÇɵ×Ó»òÌرð²ËµÄÈ˲Żá»ìÓöà¸ö¿â£¬ÄÜ»ìÓÿâµÄÈËÒ²Ö»ÓиßÊÖ²ÅÄܱÜÃâÃüÃû³åÍ»µÄÞÏÞΡ£Ê®´óÀà¿âÖУ¬Ç°Ã漸¸ö¶¼ÊǶÔÔ­ÐͽøÐзè¿ñÀ©Õ¹µÄ¡£Ïñmootools£¬´úÂë²»¶à£¬µ«ÄÜʵÔÚ±ÈjQuery¶àÐí¶àµÄ¹¦ÄÜ¡£Õâ¾ÍµÃÒæÓÚÔ­ÐÍÀ©Õ¹´øÀ´µÄ´úÂëÁ¿µÄ¼õÉÙ¡£µ±È»£¬ÎÒÃÇ»¹ÊÇÒª±ÜÃâ¶ÔObject½øÐÐÀ©Õ¹£¬Õâ¸öÕæµÄÊÇÇ£Ò»·¢¶¯È«Éí¡£
ÔÚÎÒÃÇ¿ªÊ¼Ê±ÏÈÁгöһЩҪÓõ½µÄ¹¤¾ß£¨Í»È»ÏëÆðÅë⿽ÚÄ¿ÖеIJÄÁϽéÉÜ¡­¡­orz£©

dom.mixin = function(result, source) {
if (arguments.length === 1) {
source = result;
result = dom;
}
if (result && source ){
for(var key in source)
source.hasOwnProperty(key) && (result[key] = source[key]);
}
if(arguments.length > 2 ){
var others = [].slice.call(arguments,2);
for(var i=0,n=others.length;i<n;i++){
result = arguments.callee(result,others[i]);
}
}
return result;
}

dom.mixin = function(result, source) {
if (arguments.length === 1) {
source = result;
result = dom;
}
if (result && source ){
for(var key in source)
source.hasOwnProperty(key) && (result[key] = source[key]);
}
if(arguments.length > 2 ){
var others = [].slice.call(arguments,2);
for(var i=0,n=others.length;i<n;i++){
result = arguments.callee(result,others[i]);
}
}
return result;
}
var fn = "prototype",
toString = Object[fn].toString;
dom.mixin({
//ÀàÐÍʶ±ð
is : function (obj,type) {
var undefined;
return (type === "Null" && obj === null) ||
(type === "Undefined" && obj === undefined ) ||
toString.call(obj).slice(8,-1) === type;


Ïà¹ØÎĵµ£º

javascript ½á¹¹ÌåʾÀý

<script>
///Óû§Êý¾Ý½á¹¹
function _tagUser()
{
 this.UserId = 0; //0-4
 this.UserName = ""; //5-
 this.Parse = function(VarTypeUser)
 {
  for (var i=0;i<VarTypeUser.length;i++)
   VarTypeUser[i] = String.fro ......

JavaScript ²âÊÔ¼°Ð£Ñ鹤¾ß

JavaScript ÊÇÒ»¿îÇ¿´óµÄ¹ã·ºÔËÓÃÓÚÏÖ´úWebÕ¾µã¼°Ó¦ÓõĽű¾ÓïÑÔ¡£×÷Ϊһ¸ö¼¼ÒÕ¾«Õ¿µÄ Web ¿ª·¢Õߣ¬ÕÆÎÕJavaScript¿ÉÒÔÔöÇ¿Óû§µÄʹÓÃÌåÑ飬Ìṩ½»»¥¼°¸»¿Í»§¶ËµÈ¹¦ÄÜ¡£
¾¡¹ÜJavaScript µÄÓï·¨·Ç³£¼òµ¥£¬µ«¶ÔÓÚд³ÌÐò¶øÑÔÈÔÈ»ÊÇÀ§ÄÑÖØÖØ£¬¾ÍÊÇÒòΪËüµÄÔËÐл·¾³£º»ùÓÚWebä¯ÀÀÆ÷¡£
ÒÔÏÂÄú¿ÉÒÔ¿´µ½ÊÕ¼¯µÄ8¸öʵÓÃµÄ JavaScrip ......

ʵÓÃµÄ JavaScript ²âÊÔ¼°Ð§Ñ鹤¾ß

ÒÔÏÂÄú¿ÉÒÔ¿´µ½ÊÕ¼¯µÄ8¸öʵÓÃµÄ JavaScript ²âÊÔ¼°Ð§Ñ鹤¾ß£¬ËüÃǶ¼¿ÉÒÔÔÚ²»Í¬»·¾³Ï½øÐе¥Ôª²âÊÔ¼°Ð£Ñé²âÊÔÄúµÄ½Å±¾¡£
JSLint
JSLintÊÇ»ùÓÚWebµÄÑéÖ¤JavaScript´íÎó´úÂëµÄ¹¤¾ß¡£ËüÓµÓеŦÄܼ°Ìض¨µÄÉèÖÃÀ´Ê¹ÓÃÄúµÄÐèÇó£¬×Ô¶¨ÒåÄãµÄÑéÖ¤Ëã·¨¡£
JsUnit
JsUnitÊÇÒ»¿îÔÚ¿Í»§¶Ë(ÔÚä¯ÀÀʱ)µÄµ¥Ôª²âÊÔJavaScript¿ò¼Ü¡£¶ÔJa ......

JavascriptÈÕÆÚ´¦ÀíÖÐÕýÔòµÄÓ¦ÓÃ


ÕýÔò±í´ïʽÊÇÒ»¸ö·Ç³£·Ç³£·Ç³£Ç¿´óµÄÓïÑÔ£¬ÕâÀïÁ¬ÐøÓÃÁËÈý¸ö·Ç³££¬ÎÒ¾õµÃ»¹²»¹»£¬Ëü½¿Ð¡µ«È´¹¦
ÄÜÇ¿´ó£¬¾ø¶ÔµÄŨËõµÄ¾ÍÊǾ«»ª£¬ÎÒ·¢ÏÖÎÒÔ½À´Ô½Ï²»¶ËüÁË¡£
Õâ¶Îʱ¼ä×öÈÕÆڵĴ¦Àí£¬ÐèÒªÓõ½ÈÕÆڵļÆË㣬°üÀ¨¼Ó¼õʲôµÄ£¬ÓÚÊÇ×öÁËÒ»¸ö¹«Óô¦ÀíµÄÀ©Õ¹£¬½Ð
String.prototype.dateExpression¡£ÒòΪÈÕÆÚ´¦Àí¶¼»áÓõ½±í´ïʽ£¬À ......

·¢²¼Ò»¸ö»ùÓÚjavascriptµÄÈÕÆÚÀ©Õ¹


javascriptÖжÔÈÕÆÚÊDZȽÏÈõµÄ£¬ÌرðÊÇÈÕÆÚ¸ñʽ»¯ºÍ´Ó×Ö·ûÖлñÈ¡ÈÕÆÚÕâÁ½¸ö¹¦ÄÜÊÇû
Óеģ¬×Ô¼ºÐ´³ÌÐòµÄʱºò·â×°ÁËÕâЩ¹¦ÄÜ£¬·ÖÏíһϣ¬Ï£Íû¶Ô´ó¼ÒÓÐÓá£ÕâЩÀ©Õ¹ÓÐЩÊÇÍøÉÏһЩÅóÓÑдµÄ£¬¾­¹ýÎҵĸÄÔ죬ÓÐЩÊÇÎÒ×Ô¼ºÐ´µÄ¡£
º¯ÊýµÄ¹¦ÄÜ·Ö±ðÊÇ£º
Date.prototype.format =
function(format)£º¸ù¾Ý±í´ïʽ½«ÈÕÆÚ¸ñʽ»¯Îª ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ