0
点赞
收藏
分享

微信扫一扫

iframe中用到的例子

iframe中用到的例子

<view:qrytr>  

      <view:qrytd colspan="4">

   <iframe id="ccbl" width="100%" src="<%=webapp %>/spscqycc/spscqyccAction!ccbllist.dhtml?map.rwzj=${map.RWZJ}" frameBorder="0" scrolling="no" onLoad="iFrameHeight('ccbl')"></iframe>

   </view:qrytd>

   </view:qrytr>  




function iFrameHeight(name) {  

             var ifm= document.getElementById(name);  

             var subWeb = document.frames ? document.frames[name].document : ifm.contentDocument;  

             if(ifm != null && subWeb != null)  

                 {

                 ifm.height = subWeb.body.scrollHeight;

                 }  

             }


   function fnsjfm() {

       $.ajax({

           url: '<%=webapp%>/spscqycc/spscqyccAction!updateFm.dhtml?map.rwzj=${map.RWZJ}',

           type: 'post',

           data: $("#form1").serialize(),

           async: true,

           complete: function(request, status) {

               var txt = request.responseText;

               if("true" == txt) {

                   var url="<%=webapp%>/spscqycc/spscqyccAction!ccbllist.dhtml?map.rwzj=${map.RWZJ}";

                   document.getElementById("ccbl").src=url;

               } else {

                   endWait();

               }

           }

       });

   }


梅花香自古寒来

举报

相关推荐

0 条评论