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

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

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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-11-06
  • 2022-01-12
  • 2022-02-04
  • 2022-12-23
猜你喜欢
  • 2021-04-12
  • 2021-11-24
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案