Compatibility between iOS9.3 and Jquery

  1. problem, the method of writing using Jquery cannot be executed on iOS9"s Wechat browser.
  2. The code for
  3. is as follows.

HTML:

/**
 *
 */
$("-sharpcancle_button").click(function(){
    alert("");
});

/**
 *
 */
$("-sharpsubmit_button").click(function(){
    submitExam();
});

//
function submitExam() {
    var hadAnswer = 0;
    var examMap = new Map();
    var ids = $(".exam-item");
    $(ids).each(function (i) {
        var queId = $(ids[i]).data("id");
        var ans = $(ids[i]).children(".exam-ans").children(".ans-item");
        $(ans).each(function (j) {
            var answerRef = $(ans[j]).children("i");
            examMap.set(queId,"");
            if($(answerRef).hasClass("true")){
                examMap.set(queId,answerRef.attr("ref"));
                return false;
            }
        });
    });
    $("-sharpexamMap").val(JSON.stringify(strMapToObj(examMap)));
    $("-sharpexamFrom").submit();
}
function strMapToObj(strMap) {
    let obj = Object.create(null);
    for (let [k,v] of strMap) {
        obj[k] = v;
    }
    return obj;
}

the device is iPhone 5s (iOS9.3), and any other phone can. There was no response after clicking submit for this version. Finally, I located the problem on the method of submitting the test paper. It should be that some syntax in this method cannot be recognized on iOS9, or there is a problem with the jquery version (2.1.1). Please help to see what problems exist in this method. I write in the background, and js is really unable to do so.

Mar.15,2021

you can compile the code with babel and convert the new syntax to the old syntax (introducing polyfill at the same time)


ios 9.3 does not support es6 syntax

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e49318-44d0b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e49318-44d0b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?