Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript “;对象没有';不支持此属性或方法”;在Internet Explorer中_Javascript_Html - Fatal编程技术网

Javascript “;对象没有';不支持此属性或方法”;在Internet Explorer中

Javascript “;对象没有';不支持此属性或方法”;在Internet Explorer中,javascript,html,Javascript,Html,有人知道我为什么会收到错误消息“Object不支持此属性或方法”-这会阻止我的站点在IE6,7,8中工作-它在其他浏览器中工作!!我认为违规的代码是: <script language="javascript"> function getFlashMovie(movieName) { var isIE = navigator.appName.indexOf("Microsoft") != -1; return (isIE) ? window[movieName] : docu

有人知道我为什么会收到错误消息“Object不支持此属性或方法”-这会阻止我的站点在IE6,7,8中工作-它在其他浏览器中工作!!我认为违规的代码是:

 <script language="javascript">
 function getFlashMovie(movieName) {
 var isIE = navigator.appName.indexOf("Microsoft") != -1;
 return (isIE) ? window[movieName] : document[movieName];

}

 function stopFlash(){
    getFlashMovie("blank1").commandFlash();
    getFlashMovie("blank2").commandFlash();
    getFlashMovie("blank3").commandFlash();

函数getFlashMovie(movieName){
var isIE=navigator.appName.indexOf(“Microsoft”)!=-1;
返回(isIE)?窗口[movieName]:文档[movieName];
}
函数stopFlash(){
getFlashMovie(“blank1”).commandFlash();
getFlashMovie(“blank2”).commandFlash();
getFlashMovie(“blank3”).commandFlash();
}


如果(AC_FL_RunContent==0){
警报(“此页面需要AC_RunActiveContent.js”);
}否则{
AC_FL_RunContent(
“代码库”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
“宽度”、“747”,
‘高度’、‘420’,
‘src’、‘blank1’,
"优质","高",,
'插件页','http://www.macromedia.com/go/getflashplayer',
'对齐','中间',
"玩","假",,
'循环','真',
“缩放”、“显示所有”,
“wmode”,“不透明”,
“偏差”、“错误”,
“id”,“blank1”,
‘bgcolor’、‘ffffff’,
'name'、'blank1',
'菜单','正确',
“allowFullScreen”、“false”,
“allowScriptAccess”、“sameDomain”,
“电影”、“空白1”,
“salign”
);//结束AC代码
}

谢谢你的反馈

不存在
id
name
blank1
blank2
blank3
的元素

编辑:此功能:

 function getFlashMovie(movieName) {
 var isIE = navigator.appName.indexOf("Microsoft") != -1;
 return (isIE) ? window[movieName] : document[movieName];

}
在我看来,它确实过时了,并且依赖于一些怪癖模式行为,其中页面的ID/名称使其成为
窗口的属性。我建议将其改为:

function getFlashMovie(id) {
   return document.getElementById(id);
}

这应该会返回正确的元素/引用。

commandFlash()是在哪里定义的?在代码中的某个地方,您访问了一个不存在的属性或方法谢谢,我已经用Flash脚本更新了帖子(对不起)谢谢Meder,但仍然会遇到同样的问题(至少它是一致的)!你能做一个像
var el=getFlashMovie('something')这样的引用吗;警报(el中的“闪光灯”)?这意味着,如果flash el有这样的特性,我会尝试一下,尽管我刚刚意识到这不是破坏我的网站的问题-回到绘图板上!
function getFlashMovie(id) {
   return document.getElementById(id);
}