毛豆先森

导航

页面通过Jquery取值然后传值到后台显示underfined是怎么回事?

页面通过Jquery取值然后传值到后台显示underfined是怎么回事?

一般情况下第一个如果用jQuery取值的,末尾要用val(),如果用$符号取值的,末尾要加上val.

eg:

businessType:jQuery("#businesstype option:selected").val(),
businessType:$("#businesstype option:selected").val,

原生的jQuery取值需要在末尾加()。

posted on 2017-03-01 10:50  毛豆先森  阅读(285)  评论(0编辑  收藏  举报