How do we use the select drop-down box to display content in MIUI? The content of the article is very compact, I hope you will study patiently.
1. Select drop-down box style in JSP
# 2. Code in js
1.//定义一个function ,将不同的codeType写入,如“课程状态”等你想要通过下拉框展示的字段都通过codeType=" "表示 $(document).ready(function(){ showList(codeType="if_teacher_sequence"); showList(codeType="course_state"); });
//定义showList函数,将codeType作为值传入 function showList(codeType) { $.ajax({ type : 'GET', url : ctx + "/api/defCode/"+codeType+".do", //跳转到controller通过方法查询出结果 success : function(data) { //成功之后返回结果到data status_list = data; mini.get(codeType).setData(status_list); //miui的setData方法通过course_state字段名称将值赋给JSP中的对应字段并显示出来 } }) };
jquery operation select (add, delete, clear)
Detailed explanation of the select method in jquery
The above is the detailed content of How to query and display the content of the select drop-down box in MIUI?. For more information, please follow other related articles on the PHP Chinese website!