我想添加新字段到現有的gsp頁面,這是由其他人寫的。無法獲得選定的值從下拉使用jQuery
<g:select name="clientId" multiple = "yes" size = "4" from="${com.mycompany.fleet.partymodel.roles.ClientRole.list()}" class = "filter_combo" optionKey="id" />
,並通過使用jQuery他越來越選定值這樣
var selectedclients = "${clientId}";
console.log(selectedclients); // prints id of selected Clients
我在同一頁
<g:select name="contractId" multiple = "yes" size = "4" from="${com.mycompany.fleet.rules.Contract.list()}" class = "filter_combo" optionKey="id"/>
添加新的下拉這樣,我想用像這樣的jQuery得到選定的值
var selectedcontracts = "${contractId}";
但它沒有獲取選定的值...我在這裏做錯了什麼?
${clientId}
究竟意味着什麼?
了'from'ŧ ag可能是問題。你還包括'from'標籤的來源嗎? – R1234 2011-06-16 08:00:22