window.parent.xxxxx (); // xxxxx () หมายถึงวิธีการหน้าหลัก
คอลัมน์เฉพาะมีดังนี้รวมถึงคลิกขวาและคลิกเหตุการณ์ของ EasyUi
parent.jsp
ส่วนหนึ่งของรหัสร่างกาย
<body> <!-ไดเรกทอรีซ้าย-> <div data-options = "ภูมิภาค: 'ตะวันตก', แยก: จริง, ชื่อเรื่อง: 'ธีม', ไอคอน: 'ไอคอน-arrowin'"> <!-จำนวนไดเรกทอรี-> <ul id = "ต้นไม้"> </ul> data-options = "region: 'center', title: 'การแสดงเนื้อหา', ไอคอน: 'icon-arrowout'" style = "overflow: hidden"> <iframe name = "leftiframe" id = "leftiframe" src = "" frameBorder = "0"> onclick = "updateTheme ();" data-options = "iconcls: 'icon-edit'"> แก้ไข </div> <div onclick = "removeObjectNode ();" data-options = "iconcls: 'icon-tip'"> ลบ </div> </div> <script type = "text/javascript"> loadtree (); </script> </body>
JS Part:
ฟังก์ชั่น loadtree () {$ ('#tree'). ต้นไม้ ({url: 'xxxxx.action, antiument: true, lines: true, oncontextmenu: ฟังก์ชั่น (e, node) {e.preventDefault (); $ (นี้) .tree (' select ', node.target); $ (นี้) .tree ('getParent', node.target); ถ้า (parent) {ถ้า (node.text == 'หัวข้อเริ่มต้น') {$ .messager.alert ("ข้อความแจ้ง }, onclick: ฟังก์ชั่น (Node) {// // standalone event var type = node.attributes.type; } child.jsp/ *** รีเฟรชธีมด้านซ้าย*/ $ (function () {window.parent.loadtree ();})