Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.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 IE中的色盒错误";对象没有';“不支持此属性或方法”;_Javascript_Jquery_Internet Explorer_Colorbox - Fatal编程技术网

Javascript IE中的色盒错误";对象没有';“不支持此属性或方法”;

Javascript IE中的色盒错误";对象没有';“不支持此属性或方法”;,javascript,jquery,internet-explorer,colorbox,Javascript,Jquery,Internet Explorer,Colorbox,我正在尝试使用以下代码将jquery颜色框添加到我的网页: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet

我正在尝试使用以下代码将jquery颜色框添加到我的网页:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
    <link rel="stylesheet" href="colorbox.css" />
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script type="text/javascript" src="jquery.colorbox-min.js"></script>
</head>
<body>
    <script type="text/javascript">
        $(function ()
        {
            $(".popup")
            .colorbox({iframe:true, innerWidth:695, innerHeight:340, overlayClose:false });

        })
    </script>
    <a class='popup' href='http://www.bbc.co.uk'>bbc.co.uk</a>
</body>

$(函数()
{
$(“.popup”)
.colorbox({iframe:true,innerWidth:695,innerHeight:340,overcyclose:false});
})

它适用于firefox和chrome。但当我在IE7中运行它时,我得到以下错误:

对象不支持此属性或方法


任何帮助都将是惊人的。

您很可能有一个
标记无效,或者包含设置为
text/javascript
以外的类型属性

如果看不到代码的这一部分,我们就无法准确地找出错误所在

更多信息

脚本标记必须具有结束符
<代码>不能在所有浏览器中工作


此外,
type
属性必须是
text/javascript
或不存在。如果它是
application/javascript
,IE的某些版本将不会执行它。

javascript文件加载是否正确?是的,所有javascript文件都正确加载了jquery的哪个版本?所有my标记都具有正确的类型text/javascript,并且所有具有结束标记。它周围的任何其他标记是否无效?如果它与标记无关,那么没有理由让一个浏览器被它阻塞。这不会是一个javascript错误,除非有更多的错误发生,你没有通知我们。我很快就用弹出窗口制作了一个空白网页,但仍然有问题,你可以把它的源代码发布到我们可以看到的地方,比如jsfiddle.com吗?你的代码对我来说很有用:但是我必须包含css和js直接由于mimetype不匹配。您的服务器是否返回具有正确mimetype的文件?