Facebook FBJS - Show content after 5 sec
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()
{
开发者_StackOverflow 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?
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.
精彩评论