-
Notifications
You must be signed in to change notification settings - Fork 2
/
DropMenu.htm
48 lines (32 loc) · 1.37 KB
/
DropMenu.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
40
41
42
43
44
45
46
47
48
<html>
<head>
<title>DropMenu</title>
<link rel="stylesheet" type="text/css" href="jWebForm.css" />
<script type="text/javascript" src="jWebForm.js"></script>
<script type="text/javascript" src="DropMenu.js"></script>
<script type="text/javascript">
$j.Page_Load = function Page_Load() {
var dropMenu = $j("DropMenu1");
var topItem = $j.DropMenu.TopItem("文件");
var subItem = $j.DropMenu.SubItem("保存", function () { alert("保存"); });
topItem.AddSubItem(subItem);
subItem = $j.DropMenu.SubItem("aaaaaaaaaaaaaaa", function () { alert("aaaaaaaaaaaaaaa"); });
topItem.AddSubItem(subItem);
subItem = $j.DropMenu.SubItem("bbbbbbbbbbbbbbbbbbb", function () { alert("bbbbbbbbbbbbbbbbbbb"); });
topItem.AddSubItem(subItem);
dropMenu.AddTopItem(topItem);
topItem = $j.DropMenu.TopItem("工具");
subItem = $j.DropMenu.SubItem("选项", function () { alert("选项"); });
topItem.AddSubItem(subItem);
subItem = $j.DropMenu.SubItem("ccccccccccccccc", function () { alert("ccccccccccccccc"); });
topItem.AddSubItem(subItem);
dropMenu.AddTopItem(topItem);
}
</script>
</head>
<body>
<j:DropMenu id="DropMenu1"></j:DropMenu>
<br />
<input />
</body>
</html>