【问题标题】:jquery GET request not working in IE and FFjquery GET 请求在 IE 和 FF 中不起作用
【发布时间】:2010-09-24 05:12:20
【问题描述】:

现在我有这个 GET 请求,它适用于 Chrome,但不适用于 IE 或 FF。

      var dire = $(this).attr('dir');
   if(dire == "ASC"){
     var dp = "DESC";
   }
   else if(dire == "DESC"){
     var dp = "ASC";
   }
   else{
     var dp = "NA";
   }

   $(this).attr('dir',dp);

   var col = $(this).attr('col');

   $('#entries').fadeOut(100,function(){
        $('#loadingGif').show();
        $.get("getData.php?fake="+makeid(),{ status: "R", column: col, dir: dp},requestCompleteRecorded);
      });

在我的 php 文件 getData.php 中,我不应该在 dir GET 请求中得到“NA”。但是由于某种原因在 FF 和 IE 中我得到“NA”。基本上我只是翻转属性,变量dp 直接进入属性字段。

那么为什么这在 Chrome 中有效,但在 FF 或 IE 中无效?

【问题讨论】:

    标签: jquery ajax internet-explorer firefox get


    【解决方案1】:

    dircol 不是有效的 html 属性。这可能是错误的原因。尝试使用classrel

    【讨论】:

    • 原来我不能使用dir作为属性,我将它切换为title,一切都很好。
    猜你喜欢
    • 2010-11-10
    • 2013-09-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多