我搜索了互聯網,直到我去了藍色,但無法弄清楚,爲什麼它不工作。jQuery AJAX奮鬥
我有JavaScript,但這只是爲Firefox工作。沒有其他瀏覽器。
所以,我決定去jQuery。
我想要做的是這樣的: - 我有一個文件夾。 - 在這個文件夾中,我有一個html.html文件。這是我的主要網站。 - 然後我有一個文件home.html。
中將Html.HTML看起來是這樣的:
<html>
<head>
<title>
Struggeling with jQuery ajax! *******
</title>
</head>
<body>
<div="one">
Load the page here
</div>
</body>
</html>
和home.html的是這樣的:
<html>
<head>
</head>
<body>
Please load this into the div! (this text will be displayed in other words)
</body>
</html>
如何在地球上我能得到這個使用jQuery?請幫幫我。我無法做到這一點。
============================================== =======================================
好吧,所以這是如何看起來像現在。在我的文件,我的Home.html:
<html>
<head>
<title>
Struggeling with jQuery ajax! *******
</title>
<script language="javascript" src="jQuery.js"></script>
<script>
$(document).ready(function() {
$("#one").load("html.html body");
});
</script>
</head>
<body>
<div id="one">
Load the page here
</div>
</body>
</html>
我下載的jQuery的開發版本,這是一個文件,其中home.html的所在(的jquery.js)。
然後在其他中將Html.HTML看起來是這樣的:
<html>
<head>
</head>
<body>
Please load this into the div! (this text will be displayed in other words)
</body>
</html>
,但是這是行不通的。我不明白「請這個加載到DIV!(這幾個字換句話說顯示)」
我相信你可以在jQuery中使用'.load()'函數。 – tymeJV 2013-04-05 20:32:44
所以你有JavaScript,你已經搜索,決定去與jQuery,仍然沒有代碼發佈? – adeneo 2013-04-05 20:35:42