Ò»¸ö¸ü¸ßЧµÄJavaScript°ætrimº¯Êý
http://code.google.com/p/update-javascript-trim/
³£¼ûµÄд·¨Îª£º
function trim(s){
return s.replace(/^\s+|\s+$/g, '');
}
ÓÅ»¯ºótrimº¯ÊýµÄ´úÂëÈçÏ£º
function trim(str) {
str = str.replace(/^\s+/g, '');
for(var i = str.length - 1; i >= 0; i--){
if(!/^\s$/.test(str.substr(i,1))) break;
}
return str.substring(0, i + 1)
}
ÏÂÔØµØÖ·£ºdown
Ïà¹ØÎĵµ£º
Jsѧϰ£¨ËÄ£©
Èç¹ûµ±Ç°ÕýÔÚÖ´ÐеÄÊÇÒ»¸ö·½·¨£¬ÔòÖ´ÐÐÉÏÏÂÎľÍÊǸ÷½·¨Ëù¸½ÊôµÄ¶ÔÏó£¬Èç¹ûµ±Ç°ÕýÔÚÖ´ÐеÄÊÇÒ»¸ö´´½¨¶ÔÏ󣨾ÍÊÇͨ¹ý new À´´´½¨£©µÄ¹ý³Ì£¬Ôò´´½¨µÄ¶ÔÏó¾ÍÊÇÖ´ÐÐÉÏÏÂÎÄ¡£
Èç¹ûÒ»¸ö·½·¨ÔÚÖ´ÐÐʱûÓÐÃ÷È·µÄ¸½ÊôÓÚÒ»¸ö¶ÔÏó£¬ÔòËüµÄÖ´ÐÐÉÏÏÂÎÄÊÇÈ«¾Ö¶ÔÏ󣨶¥¼¶¶ÔÏ󣩣¬µ«Ëü²»Ò»¶¨¸½ÊôÓÚÈ«¾Ö¶ÔÏó¡£È«¾Ö¶ÔÏóÓɵ±Ç°» ......
1. jQuery tablesorter
http://tablesorter.com/docs/
2. Table sorting with Prototype
http://tetlaw.id.au/view/blog/table-sorting-with-prototype/
3. Sorttable
http://www.kryogenix.org/code/browser/sorttable/
4. Table Sorting Javascript
http://yoast.com/articles/sortable-table/
5. Sorting Tabl ......
Õâ¸öϵÁÐÎÄÕÂÖ÷ÒªÊǽ²ÊöʵÏÖJavascriptÍÏ×§¹¦ÄܵĻù´¡ÖªÊ¶£¬²¢½«ÔÚ×îºó¸ø³öÒ»¸öÍêÕûµÄʾÀý¡£Êʺ϶ÔÍÏ×§ÍêÈ«²»¶®µÄÈËÔĶÁ¡£
µÚһƪ¾ÍÏȽ²½²JavascriptÖеÄoffsetParentÊôÐÔ°É¡£
Ö§³ÖµÄä¯ÀÀÆ÷£ºInternet Explorer 4.0+£¬Mozilla 1.0+£¬Netscape 6.0+£¬Opera 7.0+£¬Safari ......
Ч¹ûͼ
´úÂë:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Scrollable</title>
<mce:script type="text/javascript"><!--
resizeCallback = function() {
......