JavaScriptÖÐÒ»µãÈÃÈ˺ܲ»Àí½âµÄµØ·½
Õâ¸öµØ·½¾ÍÊÇΪʲôËüµÄStringÀàÐͲ»Ö±½ÓÌṩһ¸ötrim·½·¨ÄØ£¿
Ϊʲôÿ´Î¶¼ÒªÐ´ÕâÑùÒ»¾ä»°ÄØ£¿
String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"");}
ÕâÑùÓÐÒâ˼Âð£¿
JavaScriptÖй涨һ¸öÕâÑùµÄ·½·¨»áËÀ°¡£¿
Ïà¹ØÎĵµ£º
ExtJS Éè¼ÆÄ£Ê½ Ö®Ò» £¨µ¥Àý£©
Extjs ·¢Õ¹ÖÁ½ñ£¬´«³ÐÁËYUIµÄΰ´ó¾«Ë裬 YUIµÃµ½ÁËDouglas Crockford£¨ÈÎÖ°ÓÚ Yahoo! µÄÒ»Ãû JavaScript ´«µÀÕߺͼܹ¹Ê¦£¬ËûÊÇÈ«Çò×îÓÐÔìÒèµÄ JavaScript ÓïÑÔר¼ÒÖ®Ò»£¬Blog£ºhttp://www.crockford.com/) ´óʦµÄÔÞͬ,¶øExtJSÒ²Êǽ«YUIµÄģʽ½Å±¾±à³ÌѧϰʹÓõÄÁÜÀ쾡Ö£ ......
JavaScript»ù±¾ÊôÐÔ·½·¨²Î¿¼
document.body.scrollTop ·µ»ØºÍÉèÖõ±Ç°ÊúÏò¹ö¶¯ÌõµÄ×ø±êÖµ£¬ÐëÓ뺯ÊýÅäºÏ,
document.body.scrollLeft ·µ»ØºÍÉèÖõ±Ç°ºáÏò¹ö¶¯ÎñµÄ×ø±êÖµ£¬ÐëÓ뺯ÊýÅäºÏ£¬
window.status=defaultStatus ½«×´Ì¬À¸ÉèÖÃĬÈÏÏÔʾ
Obejct.innerHTML ¶ÔÏóObject±êÇ©ÖеÄhtmlÔ´´úÂë
Ob ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>ÍøÒ³¼ÆËãÆ ......
ÏÂÃæ¶¼ÊÇÎÒÊÕ¼¯µÄһЩ±È½Ï³£ÓõÄÕýÔò±í´ïʽ£¬ÒòΪƽ³£¿ÉÄÜÔÚ±íµ¥ÑéÖ¤µÄʱºò£¬Óõ½µÄ±È½Ï¶à¡£ÌØ·¢³öÀ´£¬Èø÷λÅóÓѹ²Í¬Ê¹Ó᣺Ǻǡ£
Æ¥ÅäÖÐÎÄ×Ö·ûµÄÕýÔò±í´ïʽ£º [u4e00-u9fa5]
ÆÀ×¢£ºÆ¥ÅäÖÐÎÄ»¹ÕæÊǸöÍ·ÌÛµÄÊ£¬ÓÐÁËÕâ¸ö±í´ïʽ¾ÍºÃ°ìÁË
Æ¥ÅäË«×Ö½Ú×Ö·û(°üÀ¨ºº×ÖÔÚÄÚ)£º[^x00-xff]
ÆÀ×¢£º¿ÉÒÔÓÃÀ´¼ÆËã×Ö·û´®µÄ³¤¶È£¨Ò» ......