对话框 dialog
提示框 alert
(static).alert(msg, callbackopt , exClassopt )→ {vjsp.Window}
示例
vjsp.alert('提示内容');
参数:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
msg | String | 提示信息 | ||
callback | function | optional | 回调函数 | |
exClass | String | optional | vjspAlertDefaultExClass | 扩展样式 |
返回: vjsp.Window对象
Type vjsp.Window
确认框 confirm
(static).confirm(msg,okfuncopt,nofuncopt, exClassopt) →{vjsp.Window}
示例
vjsp.confirm('请选择是/否' , function(){
alert('点击了是');
},function(){
alert('点击了否');
});
参数:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
msg | String | 提示信息 | ||
okfunc | function | optional | 点击“是”的回调函数 | |
nofunc | function | optional | 点击“否”的回调函数 | |
exClass | String | optional | vjspConfirmDefaultExClass | 扩展样式 |
返回: vjsp.Window对象
Type vjsp.Window
弹出自定义对话框 dialog
(static).dialog(content, btnsopt, titleopt, exClassopt)→ {vjsp.Window}
示例
vjsp.dialog('dialog',[
{
text : '自定义按钮',
handler : function(e){
alert('点击了自定义按钮');
}
}
]);
参数:
Name | Type | Attributes | Default | >Description |
---|---|---|---|---|
content | String | 内容(可以是HTML字符串) | ||
btns | Array | optional | 自定义按钮数组 | |
title | String | optional | 标题 | |
exClass | String | optional | vjspDialogDefaultExClass | 扩展样式 |
返回: vjsp.Window对象 |
Type vjsp.Window
弹出iframe窗口 frameWindow
(static).frameWindow(url, widthopt, heightopt, titleopt, exClassopt)→ {vjsp.Window}
示例
vjsp.frameWindow('/test/abcd.html' , 500 , 500);
参数:
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 | 扩展样式 |
返回: vjsp.Window对象
Type vjsp.Window
弹出网页窗口 openx
(static).openx(url, widthopt, heightopt)
对于window.open的封装,不传width,height参数时为最大化
示例
vjsp.openx('/test/abcd.html' , 500 , 500);
参数:
Name | Type | Attributes | Description |
---|---|---|---|
url | String | 打开地址 | |
width | Number | optional | 宽 |
height | Number | optional | 高 |