页面通过Jquery取值然后传值到后台显示underfined是怎么回事?
一般情况下第一个如果用jQuery取值的,末尾要用val(),如果用$符号取值的,末尾要加上val.
eg:
businessType:jQuery("#businesstype option:selected").val(),
businessType:$("#businesstype option:selected").val,
原生的jQuery取值需要在末尾加()。
页面通过Jquery取值然后传值到后台显示underfined是怎么回事?
一般情况下第一个如果用jQuery取值的,末尾要用val(),如果用$符号取值的,末尾要加上val.
eg:
businessType:jQuery("#businesstype option:selected").val(),
businessType:$("#businesstype option:selected").val,
原生的jQuery取值需要在末尾加()。
转载于:https://www.cnblogs.com/wuwei312/p/6483186.html