开发者

Facebook FBJS - Show content after 5 sec

开发者 https://www.devze.com 2023-04-01 17:33 出处:网络
I have this javascript code and I want to convert it in FBJS, but I don\'t know how. <html> <head>

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消