-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
76 lines (72 loc) · 2.41 KB
/
index.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!doctype html>
<html>
<head>
<title>周家宝 ( ۳ ˚ Д ˚ ) ۳ 出发 ~-kabo233</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="css/index.css"/>
<link rel="stylesheet" href="layui/css/layui.css">
<script type="text/javascript;" src="js/jquery-2.1.4.min.js"></script>
<script src="layui/layui.all.js"></script>
</head>
<body>
<div class="layui-fluid">
<div class="layui-row">
<div class="left layui-col-md10">
<div class="top">
<div class="layui-col-md2 logo layui-col-md-offset1"><a href=""><img src="images/logo1.png"/></a></div>
<ul class="nav layui-col-md7 layui-col-md-offset1">
<li class="nav-item"><a href="">项目</a></li>
<li class="nav-item"><a href="">代码插件</a></li>
<li class="nav-item"><a href="">小程序</a></li>
<li class="nav-item"><a href="">趣味api</a></li>
<li class="nav-item"><a href="">记事本</a></li>
<li class="nav-item"><a href="">关于我</a></li>
<div class="layui-clear"></div>
</ul>
<i class="layui-icon layui-icon-search"></i>
<div class="layui-clear"></div>
</div>
<div class="select layui-col-md12">
<form class="layui-form" action="" lay-filter="select">
<select name="select" lay-verify="" lay-search >
<option value="">搜索</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
</form>
</div>
</div>
<div class="right layui-col-md2">
<div class="r_top">
<div class="login"><a href="">登录</a> / <a href="">注册</a></div>
<div class="en"><a href="">EN</a> / <a href="">CN</a></div>
</div>
</div>
</div>
</div>
<script>
//一般直接写在一个js文件中
layui.use(['layer', 'form'], function(){
var layer = layui.layer
,form = layui.form;
});
</script>
<script>
layui.use('form', function(){
var form = layui.form;
form.render(null, 'select'); //更新 lay-filter="select" 所在容器内的全部表单状态
//监听提交
form.on('submit(formDemo)', function(data){
layer.msg(JSON.stringify(data.field));
return false;
});
form.on('select()', function(data){
console.log(data.elem); //得到select原始DOM对象
console.log(data.value); //得到被选中的值
console.log(data.othis); //得到美化后的DOM对象
});
});
</script>
</html>