Created
December 23, 2016 14:26
-
-
Save YeomanYe/463ec1c6b8f93d13b48e56159938c9fe to your computer and use it in GitHub Desktop.
EasyUI:dynamicCombobox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 动态生成combobox,获取后端传来的json数据 | |
* @param {string} comboboxId combobox的ID | |
* @param {string} url url | |
* @param {string} value combobox的value对应的属性名 | |
* @param {string} text combobobx的显示文本对应的属性名 | |
*/ | |
function dynamicCombobox(comboboxId,url,value,text){ | |
$("#"+comboboxId).combobox({ | |
valueField:value, | |
textField:text, | |
url:url, | |
editable:false | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment