weixin_33696106 2019-04-03 04:25 采纳率: 0%
浏览 1207

如何解决“ $ is undefined”

"I'm upgrade jQuery1.12.4 to jQuery3.3.1"

Error: "$ is undefined"

currentAjaxRequest = $.ajax({
        type: "POST",
        url: lookupurl,
        data: $(document.frmasp).serialize(),
        success: function (data) {
            $("#TDSearchCriteria > *").remove();
            if (data.substring(0, 2) == "
") {
                data = data.substring(2, data.length);
            }
            $("#TDSearchCriteria").append($(data).find("#TDSearchCriteria").html());
            $("#Result > *").remove();
            $("#Result").append($(data).find("#Result").html());
            $("#PageNumber > *").remove();
            $("#PageNumber").append($(data).find("#PageNumber").html());
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            alert("Error: " + errorThrown);
        }
    });  
  • 写回答

1条回答 默认 最新

  • 旧行李 2019-04-03 06:23
    关注
    --- Try this
    <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
    <script>
    $.ajax({
            type: "POST",
            url: lookupurl,
            data: $(document.frmasp).serialize(),
            success: function (data) {
                $("#TDSearchCriteria > *").remove();
                if (data.substring(0, 2) == "
    ") {
                    data = data.substring(2, data.length);
                }
    
    
           $("#TDSearchCriteria").append($(data).find("#TDSearchCriteria").html());
                $("#Result > *").remove();
                $("#Result").append($(data).find("#Result").html());
                $("#PageNumber > *").remove();
                $("#PageNumber").append($(data).find("#PageNumber").html());
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert("Error: " + errorThrown);
            }
        }); 
      </script>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64