简体   繁体   English

Microsoft JScript运行时错误:对象不支持此属性或方法

[英]Microsoft JScript runtime error: Object doesn't support this property or method

I am trying to use jGrowl in ASP.NET, but am getting a Microsoft JScript runtime error: Object doesn't support this property or method error when trying to run the page in IE. 我试图在ASP.NET中使用jGrowl,但我收到Microsoft JScript运行时错误:尝试在IE中运行页面时,Object不支持此属性或方法错误。 Any ideas why this is happening? 任何想法为什么会这样?

<link rel="stylesheet" href="css/jquery.jgrowl.css" type="text/css" />
<style type="text/css">
div.jGrowl div.smoke {
background: url(images/smoke.png) no-repeat;
-moz-border-radius:  0px;
-webkit-border-radius: 0px;
width:      280px;
height:     55px;
overflow:     hidden;
}
</style>
<!--[if lt IE 7]>
<link rel="stylesheet" href="css/jquery.jgrowl.ie6.css" type="text/css" />
<![endif]-->

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.jgrowl.js"></script>
<script type="text/javascript" src="js/jquery.template.js"></script>
<script type="text/javascript" src="js/jquery.ui.all.js"></script>
<script type="text/javascript" src="js/jquery-1.4.2.js" ></script>
<script type="text/javascript">

    $(document).ready(function(){

    $('#test2').jGrowl("TEST", {
        theme: 'smoke',
        closer: true
    });

});

</script>

BODY: 身体:

<a onclick="$('#test2').jGrowl('TEST');" href="javascript:void(0);">Sample 3</a>

I think you are including jquery twice. 我想你是两次包括jquery。 You have a jquery.js and jquery-1.4.2.js script files included. 您有一个jquery.js和jquery-1.4.2.js脚本文件。 Everything seems to be plugging into the first instance and then the last include overrides $ . 一切似乎都插入到第一个实例中,然后最后一个包括覆盖$ So that's why you're seeing this error message. 这就是你看到这个错误信息的原因。

Including 2 jquery files of the same type generates this type of errors. 包括2个相同类型的jquery文件会生成此类错误。 Get rid of one of them and your problem is solved. 摆脱其中一个,你的问题就解决了。

//<script type="text/javascript" src="js/jquery.js"></script>   
<script type="text/javascript" src="js/jquery.jgrowl.js"></script>  
<script type="text/javascript" src="js/jquery.template.js"></script>  
<script type="text/javascript" src="js/jquery.ui.all.js"></script>  
<script type="text/javascript" src="js/jquery-1.4.2.js" ></script>   

可能您还没有发布完整的页面源代码,但如果除了其他JQuery / JavaScript包含此行外,请尝试将其从页面中删除。

<script language="javascript" type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Microsoft JScript运行时错误:对象不支持此属性或方法 - Microsoft JScript runtime error: Object doesn't support this property or method Microsoft JScript运行时错误:对象不支持属性或方法&#39;addEventListener&#39; - Microsoft JScript runtime error: Object doesn't support property or method 'addEventListener' Microsoft JScript运行时错误:对象不支持属性或方法“ val” - Microsoft JScript runtime error: Object doesn't support property or method 'val' Microsoft JScript运行时错误:对象不支持属性或方法“ validate” - Microsoft JScript runtime error: Object doesn't support property or method 'validate' 对于我的其中一页上具有autopostback = true的任何内容,我收到“ Microsoft JScript运行时错误:对象不支持此属性或方法”错误 - I get a “Microsoft JScript runtime error: Object doesn't support this property or method” error for anything with autopostback=true on one of my pages 运行时错误438。对象不支持此属性或方法 - Runtime error 438. Object doesn't support this property or method 0x800a01b6-JavaScript运行时错误:对象不支持属性或方法“ cookie” - 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'cookie' JavaScript运行时错误:对象不支持jquery-ui.js中的属性或方法“替换” - JavaScript runtime error: Object doesn't support property or method 'replace' in jquery-ui.js 为什么 JavaScript 运行时错误:Object 不支持属性或方法 'datepicker' 发生?(datepicker 不是函数) - Why does JavaScript runtime error: Object doesn't support property or method 'datepicker' happen?(datepicker is not a function) 为什么 JavaScript 运行时错误:Object 不支持属性或方法 'getTime' 发生?(getTime 不是函数) - Why does JavaScript runtime error: Object doesn't support property or method 'getTime' happen?(getTime is not a function)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM