| 类别: |
Javascript, function
|
| 标签: |
tag, js, fTagCase, lower, lowercase, toLowerCase, toUpperCase, upper, uppercase
|
| 摘要: |
..
|
| 正文: |
- function fTagCase(Source, bUpperCase)
- {// shawl.qiu code : return string
- var bStr = false;
- if(Source.constructor==String) Source = [Source], bStr = true;
-
- Source[0] = Source[0].replace
- (
- /(<(?:\/|)[a-zA-Z][^<>]*?)([\s][^<>]*?)(>)/g
- ,
- function($0, $1, $2, $3)
- {
- if(bUpperCase) $1 = $1.toUpperCase();
- else $1 = $1.toLowerCase();
-
- return [$1, $2, $3].join("");
- }
- );
-
- if(bStr) return Source[0];
- } // end function fTagCase(Source, bUpperCase)
|
| 文章相关信息: |
|
| 主题: |
js 设置标签名为大写或小写函数 fTagCase
|
| 发表者: |
shawl.qiu
|
| 电子邮件: |
shawl.qiu@gmail.com
|
| QQ: |
908202921
|
| MSN: |
btbtd@msn.com
|
| Homepage: |
http://www.btbtd.org/
|
| Blog: |
http://blog.csdn.net/btbtd/
|
| 发表日期: |
2007-8-13 0:55:35
|
| 更新日期: |
2007-8-13 0:55:35
|
| 来源引用: |
shawl.qiu CSharp DotNet 个人资料管理系统
|
| 引用本页: |
http://gi.2288.org/mod/code/display/Default.aspx?aid=523
|