从jquery中的XSLT加载动态添加的元素的事件

时间:2018-08-30 09:23:51

标签: javascript jquery xslt dom

我通过XSLT将表格转换为表格,然后通过XHR加载表格,完成后,我通过jquery显示表格。我给表单ID为“#incubationConfigForm”

我可以通过以下有效的代码将诸如click之类的事件附加到所创建的表单中:

        $("#main").on("change", "#incubationConfigForm", function (e) {
            console.log("Inkubation Form mit Index " + e.target.id + " changed");
            //Save all changed elements in a table, do not allow duplicate elements.

            if (_changedFormIndexes.indexOf(e.target.id) === -1) {
                _changedFormIndexes.push(e.target.id);
            }




        });

现在我想向该表单注册另一个事件,该事件在加载表单时触发,如下所示:

     $("#main").on("load", "#incubationConfigForm", function (e) {
            $("#submitButton").attr("value", "Senden");

        });

我知道load事件已贬值。

我也尝试过这个,但没有成功:

       $( "#incubationConfigForm" ).on("load",function() {
            //TODO: Install event when the form is loaded. 
            console.log("incubationConfigForm loaded")
        });

执行此操作的适当事件是什么,或者还有其他解决方案?

0 个答案:

没有答案