如何循環存儲在'ul'標籤的變量中的HTML?這是我迄今爲止,但警告()甚至不觸發,我是個有點失落......循環遍歷變量中的元素
var data = 'HTML';
$('ul', data).each(function(i,v) {
var theTag = v.tagName;
var theElement = $(v);
var theValue = theElement.html();
alert(theTag+'\n'+theElement+'\n'+theValue);
});
感謝
非常感謝......英雄! – arbme