请问这个回调函数为什么没有执行 微博接口

zhiyuanzheliuzhaojun 2013-03-11 09:42:28
<html xmlns:wb=“http://open.weibo.com/wb”>
<script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=3696776640" type="text/javascript" charset="utf-8"></script>
<wb:follow-button uid="2991975565" type="red_2" width="136" height="24" ></wb:follow-button>
<script>
WB2.anyWhere(function(W){
W.widget.followButton({
'show_name' : true, //是否显示名称
'show_cancel': true, //是否显示取消关注按钮
'callback' :'test'
});
});
function test(){
alert("wwww");
}
</script> test 函数为什么没有执行在我点击关注按钮的时候
...全文
143 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wb="http://open.weibo.com/wb"> <head> <title>微博关注按钮</title> <meta name="keywords" content="weibo,javascript sdk,jssdk,open.weibo.com" /> <meta name="description" content="weibo jssdk是一个面向Javascript程序员的SDK。" /> <script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=3696776640" type="text/javascript" charset="utf-8"></script> </head> <body> <div class="mainContent yahei"> <ul> <li> <p>登录后显示用户头像、名称、及关注关系</p> <p class="js">JavaScript 代码</p> <div id="wb_follow_btn" style="width:50em;height:80px;border:1px solid #bbb;background:#eee; padding:5px 2px;">关注按钮容器</div> <script> WB2.anyWhere(function(W){ W.widget.followButton({ 'nick_name': '姚晨', //用户昵称 'id': "wb_follow_btn" }); }); </script> </li> </ul> </div> </body> </html> 这样写就显示不出来关注按钮

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧