xtJS虽然能够作出非常华丽的页面,但对于大量的数据显示来说任然存在着很多的不足!而使用iframe则可以巧妙的解决该问题,使我们运用Ext更加灵活自如,将我们的项目做得更加完美!下面讲述的就是iframe的简单用法:(如有更好的解决方案望各位指出)

1.index.html:

<script type="text/javascript">
  var addWin = null;
  var editWin = null;
  var fun_del ;
   Ext.onReady(function(){
   editWin = new Ext.Window({
   id:'editWin',
    title : '编辑窗口',
    width : 400,
    height : 350,
    modal : true,
    closeAction : 'hide',
    html:'This is editForm!'
   });
   
   addWin = new Ext.Window({
    id:'addWin',
    title : '主窗口',
    width : 400,
    height : 350,
    modal : true,
    closeAction : 'hide',
    html:'<iframe >
   });
   addWin.show();
   
   fun_del = function(){
    alert('This is delete function!');
   }
   });
</script>

 




2.frame.html


<script type="text/javascript">
  function changeWin(){
   Ext.onReady(function() {
      parent.addWin.hide();
      parent.editWin.show();
   });
  }
  function delWin(){
   parent.fun_del();
  }
</script>

<body>
  <a href="">编辑</a>
  <a href="">删除</a>
</body>

 

相关文章:

  • 2022-12-23
  • 2019-08-01
  • 2021-06-26
  • 2021-08-28
  • 2022-12-23
  • 2021-07-14
  • 2021-10-18
  • 2021-05-19
猜你喜欢
  • 2022-12-23
  • 2021-11-25
  • 2021-10-04
  • 2021-08-26
  • 2021-10-09
  • 2022-01-19
相关资源
相似解决方案