Use the Load method to load jquery html page, the introduction of html js invalid

<script>
    $(function(){
        /*公共部分:登录弹框*/
        $("#login_box").load("../../template/login/login.html",function(){
           var sc =  document.createElement("script");
           sc.src= "../../template/login/login.js";
           $("body").append(sc);
        });
    })
    </script>

 

Guess you like

Origin www.cnblogs.com/mr-hu2009/p/12522180.html