如何编写 Facebook 报价应用程序,从 PHP/MySQL 页面获取数据,随机生成报价?我已经开发了一个,但它使用的是 FBML 不支持的 jQuery,因为我想要配置文件选项卡,所以我宁愿选择 FBML 而不是 iframe。
如何在没有 jQuery 或使用 FBJS 的情况下做到这一点?
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/jquote.css" />
<!--<script type="text/javascript" src="scripts/jquery-1.4.2.js"></script>-->
<script type="text/javascript" src="fbjqry/utility.js"></script>
<script type="text/javascript" src="fbjqry/fjqry.js"></script>
<script type="text/javascript">
// On page load, fill the box with content.
$(document).ready(function() {
$("#quoteContainer").load("quote.php");
});
var auto_refresh = setInterval(
function ()
{
$('#quoteContainer').load('quote.php');
}, 5000); // refresh every 10000 milliseconds
</script>
</head>
<div id="wrapper">
<div class="header"> Quote of the Day</div>
<div id="quoteContainer">
</div>
</div>
</html>