弹窗

该弹窗基于easyUI,不过这不是问题,插件都大同小异,主要是把iframe的内容添加到弹出窗就行了,然后通过定义的callback()函数操作数据。

html代码:

施工类型:<input type="text" id="type_names" name="type_names" value="" readonly="readonly" />
<button type="button" onclick="
BuildType.selectBuildType()" >选择</button>
<input type="hidden" id="type_ids" name="type_ids" value=""/>
</td>

js代码:

var BuildType = {

  win:null,
  selectBuildType:function(){
  var url = "${pageContext.request.contextPath}/team/buildteamType_toTeamTypesTreeView.do";
      var content = '<iframe src="' + url + '" width="100%" height="99%" frameborder="0" scrolling="no"></iframe>';  
      var boarddiv = '<div id="selectBuildType" title="施工类型选择"></div>'
      $(document.body).append(boarddiv);  
    BuildType.win = $('#selectBuildType').dialog({  
            content: content,  
            width: 350,  
            height: 450,  
            modal: true,  
            title: '施工类型',  
            onClose: function () {  
                $(this).dialog('destroy');//后面可以关闭后的事件  
            }  
        });  
    BuildType.win.dialog('open'); 
  },
  callBack:function(data){
  //回调函数,通过该方法操作数据
  BuildType.winClose();
  },
  winClose:function(){
  BuildType.win.dialog('close'); 
  }

  }




猜你喜欢

转载自blog.csdn.net/chenbhhh/article/details/79479814
今日推荐