Class Index | File Index

Classes


Class $we.utils

we utils方法
Defined in: utils.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
$we.utils.addStyleSheet(css, doc)
增加一个stylesheet
<static>  
$we.utils.exec(text, bTrans)
让浏览器执行脚本
<private> <static>  
$we.utils.getFormElements(ele)
获取表单元素
<static>  
$we.utils.include(file, path, callback)
script loader
<static>  
$we.utils.initNameSpace(router, root)
初始化命名空间
<static>  
$we.utils.request(url, data, success, fail, method, isJsonp)
ajax请求统一封装
<static>  
$we.utils.setValue(v, d)
根据值是否undefined来设置默认值
<static>  
$we.utils.validForm(ele)
验证表单
Class Detail
$we.utils()
Method Detail
<static> $we.utils.addStyleSheet(css, doc)
增加一个stylesheet
Parameters:
{string} css
css的具体text
{dom} doc
document

<static> $we.utils.exec(text, bTrans)
让浏览器执行脚本
Parameters:
{string} text
需要执行的脚本代码
{bool} bTrans
是否需要转译 < > 特殊符号

<private> <static> $we.utils.getFormElements(ele)
获取表单元素
Parameters:
ele
表单容器

<static> {function} $we.utils.include(file, path, callback)
script loader
Parameters:
{mixed} file
需要加载的文件,string或者array
{string} path
路径
callback
Returns:
{function} 回调函数

<static> $we.utils.initNameSpace(router, root)
初始化命名空间
Parameters:
{String} router
命名空间的名称
{Object} root
命名空间的基准,默认是window

<static> {object} $we.utils.request(url, data, success, fail, method, isJsonp)
ajax请求统一封装
Parameters:
{string} url
URL
{object} data
数据
{function} success
成功的回调
{function} fail
失败的回调
{string} method
POST/GET
{Boolean} isJsonp
是否是jsonp
Returns:
{object} jxhr

<static> $we.utils.setValue(v, d)
根据值是否undefined来设置默认值
Parameters:
{mixed} v
要检测的值
{mixed} d
默认值

<static> $we.utils.validForm(ele)
验证表单
Parameters:
ele
验证元素

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Jan 06 2013 19:48:20 GMT+0800 (CST)