easyUI dialog弹出时适应页面大小

  • Post author:
  • Post category:其他



<span style="white-space:pre">	</span>function funExceute(index){		
		if(window.screen){			
			var myw = screen.availWidth * 0.8;   
			var myh = screen.availHeight* 0.7;
				
			$('#win').dialog({
			<span style="white-space:pre">	</span>title: '测试',
				width: myw,
				height: myh,
				maximizable:true,
				minimizable:false,
				collapsible:false,
				buttons:[{
					text:'提交',
					iconCls:'icon-save',
					handler:function(){alert("提交")}
				},{
					text:'关闭',
					iconCls:'icon-cancel',
					handler:function(){
					$('#win').window('close'); 
				}}],
				    modal: true
				});
			$('#win').dialog('open');  
			}	 
			 
	<span style="white-space:pre">	</span>}



版权声明:本文为u011546156原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。