我正在尝试使用XFBML显示一个Facebook用户的头像。我使用了以下代码:
var container = document.getElementById("profilePicture");
var profilePic = new FB.XFBML.ProfilePic(container);
//profilePic.setAttribute("uid", userId);
FB.XFBML.Host.addElement(profilePic);如何设置元素的uid属性?(注释行不起作用)
发布于 2009-02-26 22:58:15
在发送到ProfilePic进行处理之前,先设置属性:
var container = document.getElementById("profilePicture");
container.setAttribute("uid", userId);
var profilePic = new FB.XFBML.ProfilePic(container);
FB.XFBML.Host.addElement(profilePic);https://stackoverflow.com/questions/554479
复制相似问题