JavaScript错误(null或不是对象)。仅在IE中

时间:2013-01-15 10:35:30

标签: javascript internet-explorer error-handling

var rows = [];
        for (var id in topics) {
            var topic = g_favoriteTopics[topics[id].id];
            var $row = $("table#Favorites tr#topicTemplate").clone();
            alert(topic.title);
            $row.find("td.txtCol a").html(topic.title);
            var href = commonVariables.formAction +
                "?PARTITION_ID=" + commonVariables.partitionId + 
                "&CONFIGURATION=" +  commonVariables.configurationId + 
                "&CMD=DFAQ&DFAQ_TOPIC_ID=" + topic.id +
                "&DFAQ_TOPIC_TYPE=" + topic.type;
            $row.find("td.txtCol a").attr("href", href);
            $row.find("td.imgCol input").attr("topicId", topic.id);
            rows.push(topic.title.toLowerCase() + "<<<>>><tr topicId=" + topic.id + ">" + $row.html() + "</tr>");
        }

警报窗口显示正确的主题标题(主题名称)。但是,在警报之后,Iam出现了Javascript错误(标题为空或不是对象)。 它在FF和chrome

中运行良好

0 个答案:

没有答案