我有这样的代码:什么能导致这个Firebug错误?
<script>
function cargar(url){
var iframe = $('<iframe>');
iframe.attr('src', url);
$('#screen').html(iframe);
}
$(document).ready(function(){
$('ul li a').click(function(e){
e.preventDefault();
cargar($(this).attr('href'));
$('ul li a').removeClass('active');
$(this).addClass('active');
});
$('ul li a').first().click();
});
</script>
即生成的iframe(含有用JavaScript和Flash一个全景图查看器),并将其插入一个div。
的事情是,这个代码,在当地,萤火虫跳转:
Elemento referenciado por ID/NAME en el ámbito global. Use el estándar del W3C document.getElementById() en su lugar.
谷歌tranlated
Element referenced by ID/NAME in global scope. Use the W3C standard document.getElementById() instead.
和网上不跳任何错误或警告,但剧本不完全工作:http://toniweb.us/m/panorama/panorama.html(控件丢失,自动播放未打开)
事情是,我不知道如何向大家展示本地版本,所以我只是提供的.zip的情况下,有人愿意来看看:http://toniweb.us/m/panorama/panorama.zip
我真的apreciate这方面有任何想法,我运行的想法,我应该做了这么久一去.. :(
你能用英文发布错误吗? – Unknown 2012-02-03 11:47:57
只是做了它(谷歌翻译) – 2012-02-03 11:48:26
可能它抱怨的iframe变量有一个名称匹配的元素?尝试重命名它 – 2012-02-03 11:50:08