更新时间:2007-01-15 15:33:41
vjsp
Classes
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
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
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
vjsp.confirm('请选择是/否' , function(){
alert('点击了是');
},function(){
alert('点击了否');
});
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
vjsp.dialog('<div>dialog</div>',[
{
text : '自定义按钮',
handler : function(e){
alert('点击了自定义按钮');
}
}
]);
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
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
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
vjsp.toast('提示!!' , 'info' , 3000);
Parameters:
Name |
Type | Attributes | Default | Description |
---|---|---|---|---|
msg |
String | 提示信息 | ||
type |
String | <optional> | 'info' |
类型 |
ops |
Number|Object | 2000 |
关闭延迟|其他配置 |