zoukankan      html  css  js  c++  java
  • Detect IFrame Load Event 探索Iframe的加载事件

    sleep 2秒后显示结果

     

    <script type="text/javascript">
            Ext.onReady(function () {
                Ext.widget('panel', {
                    title: 'My Slow Iframe',
                     300,
                    height: 300,
                    items: {
                        xtype: 'component',
                        autoEl: {
                            tag: 'iframe',
                            style: 'height:100%;100%;border:none;',
                            src: 'a.ashx'
                        },
                        listeners: {
                            load: {
                                element: 'el',
                                fn: function () {
                                    this.parent().unmask();
                                }
                            },
                            render: function () {
                                this.up('panel').body.mask('Loading...');
                            }
                        }
                    },
                    renderTo:document.body
                });
            });
        </script>

     a.ashx页面

    <%@ WebHandler Language="C#" Class="a" %>
    
    using System;
    using System.Web;
    
    public class a : IHttpHandler {
        
        public void ProcessRequest (HttpContext context) {
            context.Response.ContentType = "text/plain";
            System.Threading.Thread.Sleep(2000);
            context.Response.Write("Hello World");
        }
     
        public bool IsReusable {
            get {
                return false;
            }
        }
    
    }
  • 相关阅读:
    进程线程模型
    操作系统运行机制
    操作系统概论
    排序
    win32消息机制
    win32框架
    map
    deque & list
    vector内部实现2
    蓝桥杯 文化之旅 图论 待复习
  • 原文地址:https://www.cnblogs.com/wangjunwei/p/2910020.html
Copyright © 2011-2022 走看看