layui
下拉框的使⽤及取值<html ><head > <meta http-equiv ="Content-Type " content ="text/html; chart=UTF-8"> <title >教学平台</title > <script src ="/jquery/1.10.2/jquery.min.js "></script > <link rel ="stylesheet " href ="sources/layui/css/layui.css " media ="all "></head ><body ><form class ="layui-form " action =""> <div class ="layui-form-item "> <label class ="layui-form-label ">教师</label > <div class ="layui-input-block "> <lect name ="teacher " lay-filter ="teacher " id ="teacher "> <option value ="teacher1">teacher1</option > <option value ="teacher2">teacher2</option > <option value ="teacher3">teacher3</option > <option value ="teacher4">teacher4</option > <option value ="teacher5">teacher5</option > </lect > </div > </div ></form ><script src ="sources/layui/layui.js " chart ="utf-8"></script ><script > layui .u ('form', function () { var form = layui .form ; //各种基于事件的操作,下⾯会有进⼀步介绍 });</script ><script > var flag = $("#teacher").val ()</script ></body ></html >
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34