After getting the data from the database, it is selected by default and I write it in two formats:
The ajax method is used :
If I write a judgment statement, when I change the option of the drop-down box and submit it, js can get the changed data, which is the value of status and role:
The following picture is the background code (part):
%
I see!
Empty defaults to 0==null, so it cannot be stored in the data array after changing it to 0. There is naturally no status value in data
My status clearly has a value, why is it judged as empty by empty?