JSP页面dialog弹出层

1.脚本代码

    function showCreate(){
    	$('#createDialog').dialog({
    			title : '新增客户经理'
   			},{
   				height : 580
		  	},{
				width : 780
			},{
				resizable : true
			},{
				modal : true
			},{
				show : 'clip'
			}
		);
    }
2.触发按钮代码

	<input type="button" class="createBtn" onclick="showCreate();" value="新增" />


3.需要在dialog中显示的div 默认设置为display:none;

<div class="formPanel" id="createDialog" style="display:none;">
		<form id="saveCusmanagerAjax" action="${ctx}/bns/loanAjax/LoanCusmanager/save.do" method="post">
		<div class="formPanelBody">
			<table class="formTable" cellpadding="0" cellspacing="0">
   				<tr>
					<td class="tdLabel">
						<span class="required"></span>省份编号:
					</td>
					<td  >
						<input value="" id="provinceNo" name="provinceNo"    />
					</td>
					<td class="tdLabel">
						<span class="required"></span>省份名称:
					</td>
					<td  >
						<input value=" " id="province" name="province"    />
					</td>
				</tr>
				<tr>
					<td class="tdLabel">
						<span class="required"></span>市区编号:
					</td>
					<td  >
						<input value=" " id="cityNo" name="cityNo"    />
					</td>
					<td class="tdLabel">
						<span class="required"></span>市区名称:
					</td>
					<td  >
						<input value=" " id="city" name="city"    />
					</td>
				</tr>
				<tr>
					<td class="tdLabel">
						<span class="required"></span>部门编号:
					</td>
					<td  >
						<input value=" " id="deptNo" name="deptNo"    />
					</td>
					<td class="tdLabel">
						<span class="required"></span>部门名称:
					</td>
					<td  >
						<input value=" " id="dept" name="dept"    />
					</td>
				</tr>
				<tr>
					<td class="tdLabel">
						<span class="required"></span>团队编号:
					</td>
					<td  >
						<input value=" " id="teamNo" name="teamNo"    />
					</td>
					<td class="tdLabel">
						<span class="required"></span>团队名称:
					</td>
					<td  >
						<input value=" " id="team" name="team"    />
					</td>
				</tr>
				<tr>
					<td class="tdLabel">
						<span class="required"></span>经理编号:
					</td>
					<td  >
						<input value=" " id="managerNo" name="managerNo"  />
					</td>
					<td class="tdLabel">
						<span class="required"></span>经理姓名:
					</td>
					<td  >
						<input value=" " id="manager" name="manager"    />
					</td>
				</tr>
				<tr>
					<td class="tdLabel">
						<span class="required"></span>是否启用:
					</td>
					<td colspan="3" >
						<input value=" " id="isused" name="isused"    />
					</td>
				</tr>
   			</table>
    	</div>
    	<div class="formPanelFoot">
    		<table cellpadding="0" cellspacing="0">
    			<tr>
    				<td>
    					<input id="submitButton" onclick="saveCusmanagerByAjax();" type="button" value="提交" />
    					<input type="button" value="后退" onclick="history.back();" />
    				</td>
    			</tr>
    		</table>
    	</div>
		</form>
    </div>

4.关闭dialog的脚本代码:

    function closeDialog(){
		$('.dialog').dialog('close');
	}  

5.


郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。