zoukankan      html  css  js  c++  java
  • dhtmlxlayout展开、伸缩

    效果如下图所示:

    <!DOCTYPE html>
    <html>
    <head>
    	<title>Expanding/collapsing cells</title>
    	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
    	<script src="../../../codebase/dhtmlx.js"></script>
    	<style>
    		div#layoutObj {
    			position: relative;
    			margin-top: 20px;
    			margin-left: 20px;
    			 600px;
    			height: 400px;
    		}
    	</style>
    	<script>
    		var myLayout;
    		var sel;
    		function doOnLoad() {
    			myLayout = new dhtmlXLayoutObject({
    				parent: "layoutObj",
    				pattern: "3L"
    			});
    			sel = document.getElementById("sel");
    			myLayout.forEachItem(function(item){sel.options.add(new Option(item.getId(),item.getId()));});
    		}
    		function getId() {
    			var sel = document.getElementById("sel");
    			var id = sel.options[sel.selectedIndex].value;
    			return id;
    		}
    		function expand() {
    			myLayout.cells(getId()).expand();
    		}
    		function collapse() {
    			myLayout.cells(getId()).collapse();
    		}
    	</script>
    </head>
    <body onload="doOnLoad();">
    	<div id="layoutObj"></div>
    	<div style="position: relative; margin-top: 40px; margin-left: 20px;">
    		Item: <select id="sel"></select>
    		<input type="button" value="Expand" onclick="expand();">
    		<input type="button" value="Collapse" onclick="collapse();">
    	</div>
    </body>
    </html>
    
  • 相关阅读:
    FNDLOAD 迁移多语言的数据定义
    Failed to lock the main memory
    fnd_function.execute/app_navigate.execute区别
    EBS Form 高亮当前行/设置行背景色
    Fndload常用命令
    EBS Form中数据提交方式(COMMIT)
    隆回护照/港澳通行证办理流程
    浅析淘宝刷单--我们如何网购
    初识 Bootstrap
    框架、架构、设计模式
  • 原文地址:https://www.cnblogs.com/streamice/p/ExpandingOrCollapsing.html
Copyright © 2011-2022 走看看