jquery load() 加载页面到指定位置 js不执行

把要异步加载的页面中,需要执行的js,写在load()方法的回调函数中执行:

$(selector).load(url,data,function(response,status,xhr))

                $('.layui-tab-content').load("../index.html",function () {
              //这里是异步加载的index.html页面 需要执行的js
                });

 

posted @ 2020-05-13 16:42  &执念  阅读(1868)  评论(0编辑  收藏  举报