日期:2014-05-16 浏览次数:20613 次
iframe.onload = function() {
               iframe.setAttribute("src", someUrl);
            }for(var userIndex=1; userIndex<10; userIndex++) {
            iframe.onload = function() {
               iframe.setAttribute("src", document.getElementsByClassName("photo_wrap")[userIndex].getElementsByTagName("a")[1].getAttribute("href"));
            }
        
        chrome.extension.onMessage.addListener(function(data) {
            var newHeader = document.createElement("h4");
            txt = document.createTextNode(data);
            newHeader.appendChild(txt);
            content.appendChild(newHeader);     
        });
        iframe.onload = function() {
               iframe.parentNode.removeChild(iframe);
            }window.onload = function () {
    var ifr = document.getElementById('iframe的ID');
    ifr.src = '第一个url';
    ifr.onload = function () {
        nowIndex++;//
        if (nowIndex < 10) {
            ifr.src = ''; //根据nowIndex配置不同的url
        }
    }
}