jquery combobox 为什么只能选到第一个值 50
functiontextcomboclick(td,url,textField,valueFiled){td.onclick=null;vartext=$("#"+td....
function textcomboclick(td, url, textField, valueFiled)
{
td.onclick = null;
var text = $("#" + td.id).text();
$("#" + td.id).html("");
var input = $("<input id='cc' class='easyui-combobox'/>")
$("#" + td.id).append(input);
$("#cc").combobox({
url: url,
multiple: true,
valueFiled: valueFiled,
textField: textField,
panelHeight: "auto"
});
}
html代码:
<link rel="stylesheet" type="text/css" href="../JqueryEasyUI/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../JqueryEasyUI/themes/icon.css" />
<script type="text/javascript" src="../JqueryEasyUI/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../JqueryEasyUI/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../JqueryEasyUI/easyui-lang-zh_CN.js"></script>
<td colspan=2 style='border-left:none' id='bm' onclick="textcomboclick(this,'../ReportSystem/ReportTagCombo.ashx?oparation=11','titleName','FTitleID')">发</td>json数据:
[{"FTitleID":117,"titleName":"\n维修负责人"},{"FTitleID":71,"titleName":"安监(检)员"},{"FTitleID":62,"titleName":"安监(检)员,安全员"},{"FTitleID":63,"titleName":"安监(检)员,班长"},{"FTitleID":64,"titleName":"安监(检)员,车间(副)主任"},{"FTitleID":65,"titleName":"安监(检)员,车间主(副)任"}] 展开
{
td.onclick = null;
var text = $("#" + td.id).text();
$("#" + td.id).html("");
var input = $("<input id='cc' class='easyui-combobox'/>")
$("#" + td.id).append(input);
$("#cc").combobox({
url: url,
multiple: true,
valueFiled: valueFiled,
textField: textField,
panelHeight: "auto"
});
}
html代码:
<link rel="stylesheet" type="text/css" href="../JqueryEasyUI/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../JqueryEasyUI/themes/icon.css" />
<script type="text/javascript" src="../JqueryEasyUI/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../JqueryEasyUI/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../JqueryEasyUI/easyui-lang-zh_CN.js"></script>
<td colspan=2 style='border-left:none' id='bm' onclick="textcomboclick(this,'../ReportSystem/ReportTagCombo.ashx?oparation=11','titleName','FTitleID')">发</td>json数据:
[{"FTitleID":117,"titleName":"\n维修负责人"},{"FTitleID":71,"titleName":"安监(检)员"},{"FTitleID":62,"titleName":"安监(检)员,安全员"},{"FTitleID":63,"titleName":"安监(检)员,班长"},{"FTitleID":64,"titleName":"安监(检)员,车间(副)主任"},{"FTitleID":65,"titleName":"安监(检)员,车间主(副)任"}] 展开
2个回答
展开全部
function textcomboclick(td, url, textField, valueFiled)
{
td.onclick = null;
var text = $("#" + td.id).text();
$("#" + td.id).html("");
var input = $("<input id='cc' class='easyui-combobox'/>")
$("#" + td.id).append(input);
$("#cc").combobox({
url: url,
multiple: true,
valueFiled: valueFiled,
textField: textField,
panelHeight: "auto"
});
}
html代码:
<link rel="stylesheet" type="text/css" href="../JqueryEasyUI/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../JqueryEasyUI/themes/icon.css" />
<script type="text/javascript" src="../JqueryEasyUI/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../JqueryEasyUI/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../JqueryEasyUI/easyui-lang-zh_CN.js"></script>
<td colspan=2 style='border-left:none' id='bm' onclick="textcomboclick(this,'../ReportSystem/ReportTagCombo.ashx?oparation=11','titleName','FTitleID')">发</td>json数据:
[{"FTitleID":117,"titleName":"\n维修负责人"},{"FTitleID":71,"titleName":"安监(检)员"},{"FTitleID":62,"titleName":"安监(检)员,安全员"},{"FTitleID":63,"titleName":"安监(检)员,班长"},{"FTitleID":64,"titleName":"安监(检)员,车间(副)主任"},{"FTitleID":65,"titleName":"安监(检)员,车间主(副)任"}]
{
td.onclick = null;
var text = $("#" + td.id).text();
$("#" + td.id).html("");
var input = $("<input id='cc' class='easyui-combobox'/>")
$("#" + td.id).append(input);
$("#cc").combobox({
url: url,
multiple: true,
valueFiled: valueFiled,
textField: textField,
panelHeight: "auto"
});
}
html代码:
<link rel="stylesheet" type="text/css" href="../JqueryEasyUI/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../JqueryEasyUI/themes/icon.css" />
<script type="text/javascript" src="../JqueryEasyUI/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../JqueryEasyUI/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../JqueryEasyUI/easyui-lang-zh_CN.js"></script>
<td colspan=2 style='border-left:none' id='bm' onclick="textcomboclick(this,'../ReportSystem/ReportTagCombo.ashx?oparation=11','titleName','FTitleID')">发</td>json数据:
[{"FTitleID":117,"titleName":"\n维修负责人"},{"FTitleID":71,"titleName":"安监(检)员"},{"FTitleID":62,"titleName":"安监(检)员,安全员"},{"FTitleID":63,"titleName":"安监(检)员,班长"},{"FTitleID":64,"titleName":"安监(检)员,车间(副)主任"},{"FTitleID":65,"titleName":"安监(检)员,车间主(副)任"}]
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询