我想用ajax加載這段代碼到我的網站?我該怎麼辦?用ajax加載代碼到網站
<ul class="rounded">
<li><div id="card" class="quickflip-wrapper"><p id="cardText"></p></div>
</li></ul>
<ul class="rounded">
<li><div class="right">Nästa</div>
</li></ul>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script type="application/javascript" src="http://www.enormous.se/dev/mobile2/main/assets/js/jquery.js"></script>
<script type="application/javascript" src="http://m.drickspel.com/assets/js/olspelet.js"></script>
我以前使用過這個代碼,但它不起作用。上面的代碼在content.php中。當我在我的瀏覽器中加載content.php時,它運行良好,但不在網站上。
$(document).ready(function() {
$("#content").load("content.php");
})
這裏是網站:http://www.enormous.se/dev/mobile2/main/#vem
很難幫助您調試您提供的代碼,您能提供更多嗎? – AlexCheuk 2013-03-01 00:54:23
鏈接到您的網站。 – Blender 2013-03-01 00:54:55
我已編輯帖子! @Blender – user2061481 2013-03-01 00:56:44