1

我收到“JQUERY 未定义”错误。你有什么想法(下面的代码)。

<%@ Page Language="C#" AutoEventWireup="true" Inherits="faturaYazici2" CodeBehind="faturaYazici2.aspx.cs" %>

<!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 runat="server">
<link href="JS/reset-fonts-grids.css" rel="stylesheet" type="text/css" />

<script src="JS/boxy/jquery.boxy.js" type="text/javascript"></script>

<script src="JS/jquery-1.3.2.min.js" type="text/javascript"></script>

<script type="text/javascript">
    $(document).ready(function() {
        window.print();
    });
</script>
........
...........
4

3 回答 3

5

您在 jQuery 之前引用了 Boxy 插件。像这样重新排序您的脚本标签:

<script src="JS/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="JS/boxy/jquery.boxy.js" type="text/javascript"></script>
于 2009-05-17T23:32:01.860 回答
0

是你的 jQuery 脚本

<script src="JS/jquery-1.3.2.min.js" type="text/javascript"></script>

加载成功?

尝试将其替换为

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

(从 Google 的网站加载 jQuery)看看是否可行。

于 2009-05-17T23:25:46.307 回答
0

您的 Asp.Net 应用程序中是否启用了安全性。我的是。因此,无法加载 jquery 文件。将以下行添加到您的 web.config:

<location path="JS">
    <system.web>
        <authorization>
            <allow users="*" />
        </authorization>
    </system.web>
</location>
于 2009-08-20T22:56:30.200 回答