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

Miz*_*iaQ 7 c# asp.net jquery

我试图在ASP.NET中使用jGrowl,但我收到Microsoft JScript运行时错误:尝试在IE中运行页面时,Object不支持此属性或方法错误.任何想法为什么会这样?

<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>
Run Code Online (Sandbox Code Playgroud)

身体:

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

Vad*_*dim 14

我想你是两次包括jquery.您有一个jquery.js和jquery-1.4.2.js脚本文件.一切似乎都插入到第一个实例中,然后最后一个包含覆盖$.这就是你看到这个错误信息的原因.