/
easyui-checkgroup-4.htm
39 lines (39 loc) · 1.29 KB
/
easyui-checkgroup-4.htm
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
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="cache-control" content="no-cache">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title></title>
<link rel="stylesheet" href="themes/default/easyui.css">
<link rel="stylesheet" href="themes/icon.css">
<script src="jquery.min.js"></script>
<script src="jquery.easyui.min.js"></script>
<script src="locale/easyui-lang-zh_TW.js"></script>
</head>
<body>
<h2>擅長的程式語言</h2>
<div id="chkgroup1" style="margin-bottom:10px"></div>
<div style="margin-bottom:10px">
<a href="#" id="ok" class="easyui-linkbutton" data-options="iconCls:'icon-ok'">確定</a>
</div>
<script>
$(function(){
$("#chkgroup1").checkgroup({
name: "language",
data: [{value:'Python', label:'Python'},
{value:'Java', label:'Java'},
{value:'C#', label:'C#'}],
dir: "v"
});
$("#ok").on("click", function(){
selected=[];
$("input[name=language]:checked").each(function(){
selected.push($(this).val());
});
alert(selected.join());
});
});
</script>
</body>
</html>