1
这段代码不会产生任何错误:为什么在分号上出现语法错误?
//if the image has tags
if(data.photo.tags.tag != '') {
//create an empty array to contain all the tags
var tagsArr = new Array();
//for each tag, run this function
$.each(data.photo.tags.tag, function(j, item){
//push each tag into the empty 'tagsArr' created above
tagsArr.push('<a href="http://www.flickr.com/photos/tags/' + item._content + '">' + item.raw + '</a>');
});
//turn the tags array into a string variable
//var tags = tagsArr.join(' ');
}
但如果我改变标签阵推线:
//push each tag into the empty 'tagsArr' created above
tagsArr.push(+ item.raw +);
});
然后我得到的分号语法错误。我试图做的是删除标记的链接,只是返回原始链接。
想法&谢谢!
你试图添加* *的括号的一些价值。 – delnan