前台页面是这样的 一个大的字段由三个小的字段组成。
<div class="fitem0">
<label>考试名称:</label>
<select id="year" name="year" class="easyui-combobox" style=" width: 65px;">
</select>
<input id="tiName1" name="tiName1"class="easyui-textbox" data-options="required:true" />
<select id="km" name="km" class="easyui-combobox" style=" width: 70px;">
</select>
</div>
但是在获取值的时候 ,却得到的空值,后台代码如下 ,该如何解决
var toolbar = [ {
text : '新建考试',
iconCls : 'icon-add',
handler : function() {
$("#xjks").dialog('open').dialog('setTitle','新建考试');
$("#xj").form('clear');
var value1 = $("#year").combobox('getValue'); //获取每一项的值
var value2 = $("#tiName1").val();
var value3 = $("#km").val();
var tiName = value1+value2+value3;
console.log(value1);
console.log(value2);
console.log(value3);
console.log(tiName);
url = 'yyj_ksgl/pkt/insertTestInfo?tiName='+tiName;
},