불행히도 EasyUI combobox의 가장 기본적인 기능조차도 작동하지 못합니다. PHP/MySQL 쿼리에서 콤보 상자 옵션을 채우려고합니다. 쿼리가 발생하여 JSON 데이터 객체를 반환하지만 데이터가 콤보 박스에 표시되도록 할 수 없습니다. 다음 단계는 콤보 상자 선택에 따라 나머지 DB 내용을 가져 오는 것이지만이 시점에서 콤보 상자를 채울 수도 있습니다.다른 jQuery EasyUI Combobox
다음은 PHP 스크립트에서 반환하는 JSON 데이터입니다.
{"temps":[{"temp_key":"1","temp_name":"Sorry we missed you"},{"temp_key":"2","temp_name":"Our conversation"}]}
다음은 콤보 박스를 만드는 페이지의 HTML 부분입니다.
<div>
<label for="email_temp">Please select e-mail template:</label>
<input id="template" class="easyui-combobox" name="email_temp"
data-options="valueField:'temps.temp_key',textField:'temps.temp_content',url:'get_templates.php'">
</div>
valueField 및 textField 옵션을 사용하여 JSON 데이터 객체의 "temps"부분을 사용하거나 사용하지 않았습니다. 내가 여기서 무엇을 놓치고 있니?