我創建了一個網頁,我想在那裏顯示另一個HTML文件。我用jQuery來做到這一點,但無法顯示我包含的文件的內容。你爲什麼認爲這發生了。非常感謝。HTML文件包括另一個HTML文件
這是我的主頁的代碼。
sample.html
<html>
<head>
<title> Sample Only </title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.js"></script>
<script>
$(function(){
$('#footerLang').load("sampleFooter.html");
});
</script>
</head>
<body>
<div id="footerLang">
<h1></h1>
</div>
</body>
</html>
sampleFooter.html
<p> THIS IS A FOOTER </p>
檢查火狐瀏覽器 –
@LaljiTadhani你是對的。 –
Ajax nga gamitin mo。 Loooool。 Kahapon pa給e。迪莫parin nakuha。 Hahahaha –