在Internet Explorer 8中运行应用程序时出错

在Internet Explorer 8中运行应用程序时出错

问题描述:

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

in jquery.min.js



如何解决这个问题

Microsoft JScript runtime error: Object doesn't support this property or method
in jquery.min.js

how to solve this problem

这个错误是一个相当普遍的错误,通常有几个不同的原因,但通常的原因是你的jQuery库和相关的脚本试图成为在实际加载之前访问和使用。 (这会导致您的jQuery对象(
This error is a fairly common one that can often have several different causes, however the usual cause is that your jQuery library and related scripts are attempting to be accessed and used prior to actually being loaded. (This would cause any uses of your jQuery object (


)的任何使用不可用,从而无法执行其任何功能。



对此的一个常见解决方案是将实际的必要代码放在内容的最后,就在关闭正文标记< / body>之前。 :



@ Scripts.Render(〜/ bundles / jquery)



< / body&gt ;



根据您使用的浏览器,您通常可以使用开发人员工具(F12),它可以显示错误本身的位置以及与之相关的其他详细信息。问题(这对任何未来的脚本调试问题都有帮助。)
) to be unavailable and thus unable to perform any of its functions).

A common solution to this would be to actually place your necessary code at the end of your content, just prior to your closing body tag </body> :

@Scripts.Render("~/bundles/jquery")

</body>

Depending on the browser that you are using, you can often use the Developer Tools (F12) which should reveal where the error itself was occurring and additional details related to the issue (which can be helpful for any future script-debugging issues).