jQuery MiniUI

标题: 事件加载问题 [打印本页]

作者: 未名账户    时间: 2013-12-13 15:04:01     标题: 事件加载问题

window.onload = function() {
        $.ajax({
            url: path + "data/equipment/MoeLssuelogServer.aspx?method=jurisdiction",
            success: function(text) {
                var myObject = eval('(' + text + ')');
                if (myObject.states != "") {
                    equcode = myObject.equcode;
                }
            },
            error: function() {
            }
        });
    }


function onActionRenderer(e) {
        var grid = e.sender;
        var record = e.record;
        var uid = record._uid;
        var rowIndex = e.rowIndex;
        。。。。。
        return s;
    }


这两个事件照理说应该先走window.onload 但为什么他先走了onActionRenderer事件

作者: factory    时间: 2013-12-13 16:01:38

是先执行的window.load
再执行的renderer的,
你之所以那么认为,肯定是因为ajax默认是异步加载的,你把他设置为同步的就行




欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) Powered by Discuz! X2