考虑以下关于 Twitter API 的代码片段。 data.followers_count
如果放在 anchor 标记中则不起作用。由于括号太多,我无法解决一些简单的串联问题。任何帮助是极大的赞赏。
function(data){
$('#twitter').html( document.getElementById('twitter').innerHTML + twitterusername[i] + ' ' +
<a href='someURL' title='someTitle'>data.followers_count</a> + ' Followers' + '<br/>');
}
最佳答案
不确定您是否不小心发布了缺少引号的代码,但最好根据您发布的内容进行猜测。
function(data)
{
$('#twitter').append( twitterusername[i] +
"<a href='someURL'title='someTitle'>" +
data.followers_count + "</a> Followers<br/>");
}
关于php - Jquery 重连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9797695/