jQuery错误:预期对象 [英] Jquery error: Object expected

查看:90
本文介绍了jQuery错误:预期对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我在aspx页面中的代码

This is my code in aspx page

<head runat="server">
<title></title>
<script src="//Scripts/jquery-1.4.1.js" type="text/javascript"> </script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#divGridView table tbody tr").mouseover(function () {
            $(this).addClass("highlightRow");
        }).mouseout(function () { $(this).removeClass('highlightRow'); })
    });       
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="divGridView">
 <asp:GridView ID="gvOpenSII" runat="server">
 </asp:GridView>

当我运行此代码时,出现错误:"Jquery运行时错误:预期对象".

When I run this code i get error: "Jquery runtime error: object expected".

我想在鼠标悬停时突出显示gridview中的特定行.

I want to highlight the particular row in gridview on mouse hover.

请帮助.

推荐答案

我会仔细检查脚本标签src属性.试试

I would double check the script tag src attribute. Try

<script src="/Scripts/jquery-1.4.1.js" type="text/javascript"> </script>

也许

<script src="Scripts/jquery-1.4.1.js" type="text/javascript"> </script>

这篇关于jQuery错误:预期对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆