0
我有以下代碼輸出我的組合框:佔位符,並在組合框中
<html>
<head>
// Included JS library
</head>
<body>
<script>
$(document).ready(function()
{
var moduleAutoSuggest = getModuleAutoSuggestOption();
// Create a jqxComboBox
$("#jqxWidget").jqxComboBox(
{
source: moduleAutoSuggest,
placeHolder : "text ...",
width: '250',
height: '25px',
disabled : false,
searchMode: 'containsignorecase',
autoComplete: true
});
obj = '';
$('#jqxWidget').on('select', function (event)
{
var args = event.args;
if (args != undefined) {
var item = event.args.item;
if (item != null)
{
obj = item;
printSelectedValue(obj);
}
}
});
});
function getModuleAutoSuggestOption()
{
var moduleAutoSuggestOption =
[
{"id" : "ALL_ICONS", "label":"All Icons"},
{"id" : "ALL_LOGOS", "label":"All Logos"},
{"id" : "ARTICLE", "label":"Newest Article"},
{"id" : "ARTICLE_SUMMARY", "label":"Headlines For 10 Newest Articles"}
];
return moduleAutoSuggestOption;
}
</script>
<div id='content'></div>
<div id='jqxWidget'>
</div>
</body>
</html>
它給了我一個工作組合框,問題是,在佔位屬性不工作,如果我點擊在輸入文本時,選擇的值犯規獲得更清晰的
任何幫助將appreaciated
鏈接到一個小提琴或演示?另外,只要看看你的代碼,你可能想要爲placeHolder格式化分號,它會爲我扔一面紅旗...... – Rob 2014-09-24 19:27:07