第一个页面:
.....其他内容..... <div class="modal" id="ID_ReformDetail"> <div class="modal-dialog" style="500px;"> <div class="modal-content"> </div> </div> </div> .....其他内容.....
第二个页面:
@model NJYM.JSYTHSE.Web.UI.Models.KSQuestionTypeModel <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> <h4 class="modal-title">模态弹出窗标题</h4> </div> <div class="modal-body"> <form id="ff" method="post" style="text-align:center;"> <table class="table table-bordered"> <tr style="display:none;"> <td>父功能点编码:</td> <td><input class="textbox-icon-readonly" style="color: #B2B2A6;" value="@Model.Pid" type="text" readonly="readonly" name="Pid" /></td> </tr> <tr> <td>父功能点名称:</td> <td><input class="textbox-icon-readonly" type="text" value="@Model.ParentName" name="ParentName" id="ParentNameid" /></td> </tr> <tr> <td>功能点编码:</td> <td> <input class="textbox-icon-readonly" type="text" value="@Model.Id" readonly="readonly" id="FunctionCodeid" name="FunctionCode" /> </td> </tr> <tr> <td>功能点名称:</td> <td><input class="easyui-validatebox" value="@Model.Name" data-options="required:true,validType:'length[0,50]'" name="FunctionName" type="text" /></td> </tr> <tr style="height:10px;"></tr> <tr> <td colspan="2" style="text-align:center;"> <a href="javascript:void(0)" class="easyui-linkbutton" style="background:#c52034;80px;color:white" data-options="iconCls:''" onclick="submitForm(this)">保存</a> <a href="javascript:void(0)" class="easyui-linkbutton" style="background:#e47b00;80px;color:white" data-options="iconCls:''" onclick="clearForm()">关闭</a> </td> </tr> </table> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">关闭</button> </div>
把第二个页面加载到第一个页面中
<div class="modal" id="ID_ReformDetail"> <div class="modal-dialog" style="500px;"> <div class="modal-content"> </div> </div> </div> //新增 function Add() { $('#ID_ReformDetail').modal({ backdrop: 'static', keyboard: false, remote: '/KSQuestionType/FunctionDetail' }); }
//最终是把页面内容放到 modal-content 属性中