我有一個名爲webview.html網頁,我如何調用從本地存儲CSS和JS鏈接的網頁視圖頁
當我來到這個頁面上,我希望它從本地存儲
加載其結構上這是保存在本地存儲 -
<!DOCTYPE html>
<html lang="en">
<head>
{{META}}
<link rel="stylesheet" href="sources/template/css/bootstrap.min.css" type="text/css">
\t
<link rel="stylesheet" href="sources/template/css/common.css" type="text/css">
</head>
<body id="page-top">
<div id="main-wrapper">
{{CONTENT}}
\t </div>
\t
\t
\t <!-- jQuery -->
<script src="sources/template/js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="sources/template/js/bootstrap.min.js"></script>
<!-- Plugin JavaScript -->
<script src="sources/template/js/jquery.easing.min.js"></script>
<script src="sources/template/js/jquery.fittext.js"></script>
<script src="sources/template/js/wow.min.js"></script>
<script src="sources/template/js/popupimage.js"></script>
<!-- Custom Theme JavaScript -->
<script src="sources/template/js/creative.js"></script>
<script src="sources/template/js/light-slider.js"></script>
<script src="sources/template/js/count.js"></script>
<script src="sources/template/js/menu.js"></script>
<script src="sources/template/js/vertical_list.js"></script>
<script src="sources/template/js/sticky.js"></script>
<script src="http://www.jqueryscript.net/demo/jQuery-Plugin-For-One-Page-Navigation-Plugin-Page-Scroll-To-ID/jquery.malihu.PageScroll2id.js"></script>
<script>
\t (function($){
\t \t $(window).load(function(){
\t \t \t $(".nav a").mPageScroll2id();
$("#lightSlider").lightSlider();
\t \t \t callCounter();
\t \t \t callvertical_list();
\t \t \t $(".menu2").sticky({ topSpacing: 0 });
\t \t });
\t })(jQuery);
</script>
</body>
</html>
一旦這種結構被加載的話,我想它加載也保存在本地存儲中的html代碼。我希望它加載編寫{{CONTENT}}
的代碼。請幫助
什麼在其上面的代碼被存儲在localStorage的變量?存儲變量的名稱是什麼?它的內容需要加載到「{{CONTENT}}」佔位符中? –
'section232'是存儲內容的關鍵字,'ttype'存儲html結構,我還沒有編碼,因爲我不知道如何處理,所以目前沒有變量。 – user2828442
這是json供大家參考 - https://www.dropbox.com/s/ghfhtvz19423rqt/Screenshot%202017-05-18%2017.01.17.png?dl=0以及要在html中加載的部分地方持有人 - https://www.dropbox.com/s/ub481e2c1sse290/Screenshot%202017-05-18%2017.05.09.png?dl=0,其描述 – user2828442