js undefined三目运算

1 js ajax传值中
2 "id":$('#id').val(),
3 若是#id不存在,使用$('#id').val()||‘’,可避免向后台传入undefined
相关文章
相关标签/搜索