How to get the value? returned by ajax correctly

<select name="PROVINCE" id="PROVINCE" onchange="change2(this.value)">//0  

  <option value="">------</option>
</select>


------------------------------------------------------
function change2(a){
          console.log(""+a);//value0
          $.ajax({
              url:"fpry/select4j.do",
              type: "GET",
              data:{cxzdm:a,cd:"2"},              
              success: function(data){
                //var v=JSON.parse(data);
                //alert(v);
                var p= $("-sharpCITY");
                p.html("<option>------</option>");
                for (var i = 0; i < data.length; iPP) {
            
                    p.html(p.html()+"<option value=""+data[i].sjID+"">"+data[i].mc+"</option>");
        } 
     }
      
        }
                ); 
     }
Mar.19,2021

this points to the question


Ajax's successful callback input parameter, which is returned by the call on the server. Take a look at data's data hierarchy, chrome console


directly pass this into change2. https://www.qqwenda.com

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-1b3a7d8-345ca.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-1b3a7d8-345ca.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?