A strange problem is that the chzn-select query of jQuery is invalid, and jquerychzn-select
A strange problem was encountered before, and the chzn-select query of jQuery failed. It is quite useful to use chosen of jQuery. This select statement can automatically query and match, which is more convenient than select2.
However, some places can be used but cannot be queried. Some places can be used again. After a long time, you still cannot find the reason. I used firebug and checked the code. It took a lot of twists and turns out the problem was finally found.
The original code is like this.
<Td> <select class = "chzn-select" id = "industryId" name = "industryId" data-placeholder = "industry" style = "vertical-align: top; width: 175px; "> <option value =" "> industry </option> <c: forEach items =" $ {listIndustry} "var =" industry "> <c: if test = "$ {paramMap. industryId = industry. industryId} "> selected </c: if >> {industry. industryName }</option> </c: forEach> </select> </td>
After modification
<Td> <select class = "chzn-select" id = "industryId" name = "industryId" data-placeholder = "industry" style = "vertical-align: top; width: 175px; "> <option value =" "> industry </option> <c: forEach items = "$ {listIndustry}" var = "industry"> <option value = "$ {industry. industryId} "<c: if test =" $ {paramMap. industryId = industry. industryId} "> selected </c: if >> {industry. industryName }</option> </c: forEach> </select> </td>
Move the position of the value to the same row as selected without any reason for the failure of searching. This situation is really tearful! If you can explain the reason, please reply and share it with me!