bklLiudl
2024-07-23 675b8bcc4a3630d95e3d0b97d933e63442075ecb
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
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Custom Menu Item - jQuery EasyUI Demo</title>
    <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
    <link rel="stylesheet" type="text/css" href="../demo.css">
    <script type="text/javascript" src="../../jquery.min.js"></script>
    <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
</head>
<body>
    <h2>Custom Menu Item</h2>
    <p>Right click on page to display menu, move to the 'Open' item to display its custom sub content.</p>
    <div style="margin:20px 0;"></div>
    <div id="mm" style="width:120px;">
        <div>New</div>
        <div>
            <span>Open</span>
            <div class="menu-content" style="text-align:left;padding:10px">
                <div style="font-weight:bold;font-size:14px;margin-bottom:10px">Select Your Language:</div>
                <ul id="tt">
                    <li>Java</li>
                    <li>Basic</li>
                    <li>C++</li>
                    <li>Fortran</li>
                </ul>
            </div>
        </div>
        <div data-options="iconCls:'icon-save'">Save</div>
        <div data-options="iconCls:'icon-print'">Print</div>
        <div class="menu-sep"></div>
        <div>Exit</div>
    </div>
    <script>
        $(function(){
            $('#mm').menu();
            $('#tt').tree();
            $(document).bind('contextmenu',function(e){
                e.preventDefault();
                $('#mm').menu('show', {
                    left: e.pageX,
                    top: e.pageY
                });
            });
        });
    </script>
 
</body>
</html>