当选择了 司机之后,后台收到的值还是0,无论怎么变化都是0
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
Just $('#type').val()just
$('#type').val()
Console the value before uploading to the background to see if there is any change.
What you mean is to use the value of the option you selected, and the first one will be selected by default. Have you changed the selected options? You can get it directly
$('#type').val();
Thanks for the invitation$('#type').val()
I typed it exactly according to your code, and the local test did not show the bug in the question
It is recommended that the subject check whether other operations have changed the value of type.
F12 Open browser debugging, check whether the parameter type in the request sent is correct, and locate the bug in the front and backend
Just
$('#type').val()
justConsole the value before uploading to the background to see if there is any change.
What you mean is to use the value of the option you selected, and the first one will be selected by default. Have you changed the selected options?
You can get it directly
Thanks for the invitation
$('#type').val()
I typed it exactly according to your code, and the local test did not show the bug in the question
It is recommended that the subject check whether other operations have changed the value of type.
F12 Open browser debugging, check whether the parameter type in the request sent is correct, and locate the bug in the front and backend