vjsp

Classes

解析器

校验器管理

表单操作

水印操作

右键菜单类

浮动窗口类

窗口类

ajax请求

全局请求设置

消息广播/订阅

同步缓存


Members

(static, constant) browserInfo


Properties:

Name
Type
Description
vjsp.browserInfo.device String 运行设备
vjsp.browserInfo.browser String 浏览器
vjsp.browserInfo.version String 浏览器版本
vjsp.browserInfo.engine String 浏览器内核
vjsp.browserInfo.language String 浏览器语言
vjsp.browserInfo.os String 操作系统
vjsp.browserInfo.osVersion String 操作系统版本


浏览器信息

Methods

(static) showWindow(title, content, widthopt, heightopt) → {vjsp.Window}


打开一个模态窗口

Example

  1. vjsp.showWindow('标题' , '弹出一个窗口' );

Parameters:

Name
Type
Attributes Default
Description
title String|Object 标题(如果title为Object则其他参数失效)
content String 内容(可以是HTML字符串)
width Number <optional> 640
height Number <optional> 480

Returns:

vjsp.Window对象

Type vjsp.Window

(static) alert (msg, callbackopt , exClassopt )→ {vjsp.Window}


alert提示

Example

  1. vjsp.alert('提示内容');

Parameters:

Name Type Attributes Default
Description
msg String 提示信息
callback function <optional> 回调函数
exClass String <optional> vjspAlertDefaultExClass 扩展样式

Returns:

vjsp.Window对象

Type vjsp.Window

(static) confirm(msg,okfuncopt,nofuncopt, exClassopt) → {vjsp.Window}


confirm对话框

Example

  1. vjsp.confirm('请选择是/否' , function(){
  2. alert('点击了是');
  3. },function(){
  4. alert('点击了否');
  5. });

Parameters:

Name Type Attributes Default
Description
msg String 提示信息
okfunc function <optional> 点击“是”的回调函数
nofunc function <optional> 点击“否”的回调函数
exClass String <optional> vjspConfirmDefaultExClass 扩展样式

Returns:

vjsp.Window对象

Type vjsp.Window

(static) dialog (content, btnsopt, titleopt, exClassopt)→ {vjsp.Window }


弹出自定义对话框

Example

  1. vjsp.dialog('<div>dialog</div>',[
  2. {
  3. text : '自定义按钮',
  4. handler : function(e){
  5. alert('点击了自定义按钮');
  6. }
  7. }
  8. ]);

Parameters:

Name Type Attributes Default
Description
content String 内容(可以是HTML字符串)
btns Array <optional> 自定义按钮数组
title String <optional> 标题
exClass String <optional> vjspDialogDefaultExClass 扩展样式

Returns:

vjsp.Window对象

Type vjsp.Window

(static) frameWindow (url, widthopt, heightopt, titleopt, exClassopt)→ {vjsp.Window}


弹出iframe窗口

Example

  1. vjsp.frameWindow('/test/abcd.html' , 500 , 500);

Parameters:

Name Type Attributes Default
Description
url String iframe src 地址
width Number <optional> 640 宽 , 如果宽和高都是-1,则最大化显示
height Number <optional> 480 高 , 如果宽和高都是-1,则最大化显示
title String <optional> 标题
exClass String <optional> vjspFrameWindow

DefaultExClass
扩展样式

Returns:

vjsp.Window对象

Type vjsp.Window

(static) openx (url, widthopt, heightopt)


弹出网页窗口

对于window.open的封装,不传width,height参数时为最大化

Example

  1. vjsp.openx('/test/abcd.html' , 500 , 500);

Parameters:

Name
Type
Attributes
Description
url String 打开地址
width Number <optional>
height Number <optional>
(static) toast(msg, typeopt, ops)


自动消失提示框

Example

  1. vjsp.toast('提示!!' , 'info' , 3000);

Parameters:

Name
Type Attributes Default
Description
msg String 提示信息
type String <optional> 'info' 类型
ops Number|Object 2000 关闭延迟|其他配置