| 类别: |
Javascript, function
|
| 标签: |
js, func, HTMLElement, fGetObj
|
| 摘要: |
..
|
| 正文: |
- function fGetObj(sId, sMsg)
- {// shawl.qiu code : return HTMLElement
- if(!sMsg) sMsg = "无法获得对象!";
- var Obj = null;
-
- switch(typeof(sId)+"")
- {
- case "string":
- Obj = document.getElementById(sId);
- break;
-
- case "object":
- Obj = sId;
- break;
- }
-
- if(Obj==null)
- {
- throw new Error(sMsg);
- }
-
- return Obj;
- } // end function fGetObj(sId, sMsg)
|
| 文章相关信息: |
|
| 主题: |
js 获得 HTMLElement 函数 fGetObj
|
| 发表者: |
shawl.qiu
|
| 电子邮件: |
shawl.qiu@gmail.com
|
| QQ: |
908202921
|
| MSN: |
btbtd@msn.com
|
| Homepage: |
http://www.btbtd.org/
|
| Blog: |
http://blog.csdn.net/btbtd/
|
| 发表日期: |
2007-7-31 1:20:35
|
| 更新日期: |
2007-7-31 1:20:35
|
| 来源引用: |
shawl.qiu CSharp DotNet 个人资料管理系统
|
| 引用本页: |
http://gi.2288.org/mod/code/display/Default.aspx?aid=506
|