Facebook FBJS - 5 秒后显示内容
我有这个 javascript 代码,我想将其转换为 FBJS,但我不知道如何。
<html>
<head>
<script type="text/javascript">
function timeMsg()
{
var t=setTimeout("alertMsg()",5000);
}
function alertMsg()
{
document.write("<p>some text</p>");
}
</script>
</head>
<body>
<a href="http://www.mywebsite.com" onclick="timeMsg()">Click</a>
</body>
</html>
有人可以帮助我吗?
I have this javascript code and I want to convert it in FBJS, but I don't know how.
<html>
<head>
<script type="text/javascript">
function timeMsg()
{
var t=setTimeout("alertMsg()",5000);
}
function alertMsg()
{
document.write("<p>some text</p>");
}
</script>
</head>
<body>
<a href="http://www.mywebsite.com" onclick="timeMsg()">Click</a>
</body>
</html>
Can someone help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
FBJS 已弃用,不建议使用它,因为所有应用程序都迁移到 iFrame(FBJS 用于 FBML 应用程序),但这里是它的文档:http://developers.facebook.com/docs/fbjs/
向下滚动到表格以查看 FBJS 的替代品JS。如果您在打开备忘单时遇到困难,那么我建议您对 Facebook 编程的基础知识进行更多研究。
FBJS is deprecated and it's not suggested to use it as all apps are migrating to iFrame (and FBJS is for use on FBML apps), but here's the documentation for it: http://developers.facebook.com/docs/fbjs/
Scroll down to the table to see what FBJS's replacements are for JS. If you have trouble with the cheat-sheet open then I would suggest doing some more research on the basics of Facebook programming.