Jsp 如何在mysql中使用查询加载数据
嗨,我在将数据从mysql数据库加载到下拉文本框时遇到问题Jsp 如何在mysql中使用查询加载数据,jsp,Jsp,嗨,我在将数据从mysql数据库加载到下拉文本框时遇到问题 <td><b>State</b></td> <td><input class="easyui-combobox" type="text" id="state" name="state" data-options="required:true"></input></td> function stateCountryList() {
<td><b>State</b></td>
<td><input class="easyui-combobox" type="text" id="state" name="state" data-options="required:true"></input></td>
function stateCountryList() {
var URL = serverURL + "/FormMgrWithList";
var parameters = "requestType=StatesView&subRequestType=refreshStates&QueryNum=1848&key=STATE";
replyFormat = getDataFromServer("POST", URL, $.deserialize(parameters), "text");
data = eval('(' + replyFormat + ')');
updateStatusMessage(data);
var comboData = data.rows;
$('#state').combobox({
data: comboData,
valueField: 'value',
textField: 'text',
cache: false,
required: true,
multiple: false,
editable: false,
onLoadSuccess: function () {
var id = $('#state').combobox('getValue');
var val = $(this).combobox("getData");
if (comboData.length === 1) {
$('#state').combobox('setValue', comboData[0].value);
}
$.each(val, function (i, obj) {
if (id === obj.text) {
$('#state').combobox('setValue', obj.value);
}
});
}
});
}
select stateid as value, statename as text from state
在此函数中,在参数中显示URL路径和查询
其显示可反序列化不是一个函数。
有没有其他类型的方法可以使用此方法?提前感谢我想我的第一步是确定反序列化的定义位置。看看是否可以找到它的位置,并确认您正在以正确的方式调用它。我想我的第一步是确定反序列化的定义位置。看看你是否能找到它的位置,并确认你调用它的方式是正确的