日期:2014-05-17  浏览次数:20802 次

火狐浏览器导入js文件出错..IE正常
JScript code

<head runat="server">
    <title>会刊列表 </title>
    <link href="../skin/01/style.css" type="text/css" rel="stylesheet" />

    <script src="../../js/jquery.js" type="text/jscript"></script>

    <script type="text/javascript">
$(document).ready(function(){

    $("#btn_true").click(function() {
        var str = "";
        $("[name='MagID'][checked]").each(function() {
            $.ajax({
                type: "POST",
                url: "UploadHandler.ashx",
                data: "MagID="+$(this).val()+"&type=true",
                success: function(msg) {
                    var message = msg;
                    if(message == 1)
                    {
                        window.location.href="MagList.aspx";
                    }
                }
            });
        })
    });

    $("#btn_false").click(function() {
        var str = "";
        $("[name='MagID'][checked]").each(function() {
           $.ajax({
                type: "POST",
                url: "UploadHandler.ashx",
                data: "MagID="+$(this).val()+"&type=false",
                success: function(msg) {
                     var message = msg;
                    if(message == 1)
                    {
                        window.location.href="MagList.aspx";
                    }
                }
            });
        })
    });
    
    $("#a_All").click(function() {
        $("[name='MagID']").attr("checked", 'true');
    });
    
    $("#a_Invert").click(function() {

        $("[name='MagID']").each(function() {

            if ($(this).attr("checked")) {
                $(this).removeAttr("checked");

            }
            else {
                $(this).attr("checked", 'true');

            }

        })
    });
    
    $("#a_None").click(function() {
        $("[name='MagID']").removeAttr("checked");
    });
});
    </script>




上面代码在IE正常没有问题
但是在火狐浏览器总是下面的报错
$ is not defined
$(document).ready(function(){ 

有高手解决办法没

------解决方案--------------------
HTML code
<script src="../../js/jquery.js" type="text/jscript"></script>