繁体   English   中英

jTweetsAnywhere发布后需要重定向到成功页面

[英]Need to redirect to success page after jTweetsAnywhere post

我有一个页面使用jTweetsAnywhere代码(从此处开始

我希望能够在成功发布Tweet后页面返回后利用重定向。 有没有人做过类似的事情并愿意分享代码?

这是我当前的代码。 我要在这里添加一个功能吗?

<div id="tweetbox"></div>
<script type="text/javascript">
   $('#tweetbox').jTweetsAnywhere({
      showTweetBox: {
         counter: false,
         width: 500,
         height: 60,
         label: '',
         defaultContent: '#MyTest http://stackoverflow.com'
      }
   });
</script>

它具有OnSubmitted函数:

<script type="text/javascript">
   $('#tweetbox').jTweetsAnywhere({
      showTweetBox: {
         counter: false,
         width: 500,
         height: 60,
         label: '',
         defaultContent: '#MyTest http://stackoverflow.com',
         onTweet: function(textTweet, htmlTweet){
            //tweet send succes
            window.location.href = "newurl.html"
         }
      }
   });
</script>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM