After obtaining the database data in thinkPHP5, the value of the drop-down box is selected by default and is passed to the background and disappears. There are pictures and codes, I hope someone can help.
3维
3维 2019-10-04 23:28:15
0
2
1170

After getting the data from the database, it is selected by default and I write it in two formats:

QQ截图20191004231221.jpg

QQ截图20191004231344.jpg

The ajax method is used :

QQ截图20191004231613.jpg

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:

QQ截图20191004231800.jpg

The following picture is the background code (part):

QQ截图20191004232305.jpg

%
3维
3维

reply all(2)
3维

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

3维

My status clearly has a value, why is it judged as empty by empty?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template