您好,欢迎来到筏尚旅游网。
搜索
您的当前位置:首页extjs设置弹出窗口

extjs设置弹出窗口

来源:筏尚旅游网

在使用extjs时,点击一个按钮或链接,弹出一个窗口:

这里的例子弹出一个图片窗口。

按钮或超链接直接调用pictureWin(path);方法

function pictureWin(path){
	formWindow = newPictureWin(path);
	formWindow.show();
}
//图片窗口
function newPictureWin(path){
	var picForm = new Ext.form.FormPanel({
		labelAlign : 'right',
		fileUpload : true,
		border : false,
		frame : true,
		autoScroll : true,
		layout : 'fit',
		items : [{
			border : false,
			autoScroll : true,
			html:"<image src='"+((jt.webContextRoot+
				 "siteStaffMgt/findPicture.action?pictureName="+encodeURI(encodeURI(path)))
				 ==""?"../images/img/login-bg.jpg":(jt.webContextRoot+
				 "siteStaffMgt/findPicture.action?pictureName="+encodeURI(encodeURI(path))))+"'/>"
		}]
	});
	var window = new Ext.Window({
		title : '查看图片',
		width : 1000,
		height : 450,
		resizable : false,
		plain : false,
		frame : true,
		border : false,
		modal : true,
		constrainHeader : true,
		autoScroll : true,
		formPanel : picForm ,
		form : picForm .form,
		closeAction : 'hide',
		items : [ picForm  ],
		listeners : {
			beforeHide : function(){
				formWindow.show();
			}
		},
		buttons : [{
			text : '关闭',
			handler : function(){
				window.hide();
			}
		}]
	});
	return window;
}

 

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- efsc.cn 版权所有 赣ICP备2024042792号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务