1. 程式人生 > >html複用方法

html複用方法

 

gulp-file-include

ejs

https://www.cnblogs.com/villy1029/p/6903612.html

 

html-loader

https://blog.csdn.net/qingzhizhenhun/article/details/79353106

 

<!-- 底部載入外部檔案 -->
    <footer class="footer">
    </footer>
    <script>
        $('.footer').load('conment/foot.html',function(responseTxt,statusTxt,xhr){
            console.log('responseTxt,statusTxt,xhr')
            // console.log(responseTxt)
            // console.log(statusTxt)
            // console.log(xhr)
        })
    </script>
--------------------- 
作者:s_666666 
來源:CSDN 
原文:https://blog.csdn.net/s_666666/article/details/79951696 
版權宣告:本文為博主原創文章,轉載請附上博文連結!

 

 https://img-blog.csdn.net/20171206133317998?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc3Vuc2hpbmVfaGFu/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast

https://blog.csdn.net/sunshine_han/article/details/78729772#commentBox 

 

 

<script src="js/jquery.min.js"></script> <script>
    $(function(){
        /*公共部分
         * 導航欄
         * footer CopyRight
         */
        $(".headerpage").load("header.html");
        $(".footerpage").load("footer.html");
    });
</script>
--------------------- 
作者:Danoge 
來源:CSDN 
原文:https://blog.csdn.net/qq_35393869/article/details/79803190 
版權宣告:本文為博主原創文章,轉載請附上博文連結!