JavaScriptÈ¥µôÁ½¶Ë¿Õ¸ñ·½·¨
// È¥µô×Ö·û´®×ó±ß¿Õ¸ñ
function trimToLeft(str){
var i;
for(i=0;i<str.length; i++) {
if(str.charAt(i)!=" ") break;
}
str = str.substr(i);
return str;
}
// È¥µô×Ö·û´®Óұ߿ոñ
function trimToRight(str){
var i;
for(i=str.length-1;i>=0;i--){
if(str.charAt(i)!=" ") break;
}
str = str.substring(0,i+1);
return str;
}
// È¥µô×Ö·û´®Á½¶Ë¿Õ¸ñ
function trim(str){
return rTrim(lTrim(str));
}
Ïà¹ØÎĵµ£º
ugmbbc·¢²¼ÓÚ 2009-11-14 09:41:43| 7628 ´ÎÔĶÁ ×ÖÌ壺´ó С ´òÓ¡Ô¤ÀÀ
var ReTitle = '»Ø¸´:Google ÅÅÃûÖÐµÄ 10 ¸ö×îÖøÃûµÄ JavaScript ¿â';
¸ÐлCOMSHARP CMSµÄͶµÝ
ÐÂÎÅÀ´Ô´:tripwiremagazine.com
JavaScript ÊÇ Web ¿ª·¢ÓëÉè¼ÆÖв»¿É»òȱµÄ¶«Î÷£¬²»¹ÜÊÇÒ»¸ö¼òµ¥µÄÍøÒ³»¹ÊÇÒ»¸öרҵµÄÕ¾µã£¬Ò²²»¹ÜÄãÊǸßÊÖ»¹ÊDzËÄñ ......
JavaScriptÓï·¨¼¯½õÊǶÔjavascript³£Óú¯ÊýµÄһЩС½á£¬±È½ÏʵÓ㬽¨ÒéÊղأ¬·½±ã²éÕÒÐèÒªµÄ×ÊÁÏ¡£
click() ¶ÔÏó.click() ʹ¶ÔÏó±»µã»÷¡£
closed ¶ÔÏó.closed ¶ÔÏó´°¿ÚÊÇ·ñÒѹرÕtrue/false
clearTimeout(¶ÔÏó) Çå³ýÒÑÉèÖõÄsetTimeout¶ÔÏó
clearInterval(¶ÔÏó) Çå³ýÒÑÉèÖõÄsetInterval¶ÔÏó&n ......
JavaScript ECMAScriptÊÇÕâ¸ö½Å±¾ÓïÑԵıê×¼»¯°æ±¾¡£ ScriptÔªËØ£º ÔÚHTML´úÂëÖÐÌí¼ÓJavaScript´úÂë Ò²¿ÉÒ԰ѽű¾´úÂë·ÅÔ ......
Ò»¸ö·Ç³£ÊµÓõÄjavascript¶ÁдCookieº¯Êý
function GetCookieVal(offset)
//»ñµÃCookie½âÂëºóµÄÖµ
{
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function SetCookie(name, v ......
http://www.xker.com/page/e2008/0807/55407.html
×î½ü·¢ÏÖDOMDocument¶ÔÏóºÜÖØÒª,»¹ÓÐXMLHTTPÒ²ºÜÖØÒª
×¢Òâ´óСдһ¶¨²»ÄÜŪ´í.
ÊôÐÔ:
1Attributes ´æ´¢½ÚµãµÄÊôÐÔÁбí(Ö»¶Á)
2childNodes ´æ´¢½ÚµãµÄ×Ó½ÚµãÁбí(Ö»¶Á)
3dataType ·µ»Ø´Ë½ÚµãµÄÊý¾ÝÀàÐÍ
4Definition ÒÔDTD»òXMLģʽ¸ø³öµÄ½ÚµãµÄ¶¨Òå(Ö»¶Á ......