⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 styles_header_imgs.html

📁 dhtmlxGrid 是跨浏览器的 JavaScript 表格控制组件(Grid Control)
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>DHTML Grid samples. dhtmlXGrid - Using images in header</title>
	<meta name="KEYWORDS" content="dhtmlxgrid, dhtml grid, javascript grid, javascript, DHTML, grid, grid control, dynamical scrolling, xml, AJAX, API, cross-browser, checkbox, XHTML, compatible, gridview, navigation, script, javascript navigation, web-site, dynamic, javascript grid, dhtml grid, dynamic grid, item, row, cell, asp, .net, jsp, cold fusion, custom tag, loading, widget, checkbox, drag, drop, drag and drop, component, html, scand">

<meta name="DESCRIPTION" content="Cross-browser DHTML grid with XML support and powerful API. This DHTML JavaScript grid can load its content dynamically from server using AJAX technology.">

</head>
<style>
	body {font-size:12px}
	.{font-family:arial;font-size:12px}
	h1 {cursor:pointer;font-size:16px;margin-left:10px;line-height:10px}
	xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
	div.hdr{
		background-color:lightgrey;
		margin-bottom:10px;
		padding-left:10px;
	}
</style>
<body>
	<div class="hdr">DHTML JavaScript Grid samples</div>
	<h1>Using images in header</h1>
	<p>
		dhtmlxGrid allows using images for column headers formating. In this case you can specify 
		different images for not sorted column header, sorted ascending and descending.
	</p>
	<link rel="STYLESHEET" type="text/css" href="../css/dhtmlXGrid.css">
	<script  src="../js/dhtmlXCommon.js"></script>
	<script  src="../js/dhtmlXGrid.js"></script>		
	<script  src="../js/dhtmlXGridCell.js"></script>	
	<table width="600">
		<tr>
			<td>
				<div id="gridbox" width="100%" height="260px" style="background-color:white;overflow:hidden"></div>
			</td>
		</tr>
	</table>
<hr>
<XMP>
<div id="gridbox" width="100%" height="250px" style="background-color:white;overflow:hidden"></div>
<script>
		mygrid = new dhtmlXGridObject('gridbox');
		mygrid.enableHeaderImages(true);//treat header labels as image file names
		mygrid.setHeader("column_a.gif,column_b.gif");
		mygrid.setInitWidths("152,152");
		...
		mygrid.init();
</script>
</XMP>
		<strong>Some notes about using images as column headers:</strong>
			<li>create two additional images for sorting (asc,desc) using original image name as follows:</li>
				<ul type="square">
				<li>original: column_a.gif</li>
				<li>asc: column_a.asc.gif</li>
				<li>desc: column_a.desc.gif</li>
				</ul>
			<li>Take into account the difference IE and Mozilla counts the with of cell (ie: with border, mozilla - without)</li>
			<li>Put all (three per column) images in grid images folder</li>		
<script>
	mygrid = new dhtmlXGridObject('gridbox');
	mygrid.setImagePath("../imgs/");
	mygrid.enableHeaderImages(true)
	mygrid.setHeader("column_a.gif,column_b.gif");
	mygrid.setInitWidths("152,152")
	mygrid.setColAlign("right,left")
	mygrid.setColTypes("ro,ed");
	mygrid.setColSorting("int,str")
	mygrid.init();
	
	mygrid.loadXML("../grid.xml");
</script>
<br><br>
<p><a href="http://www.scbr.com/docs/products/dhtmlxGrid/index.shtml" style="font-weight:bold;">Go to the dhtmlxGrid main page</a> or <a href="javascript:self.close()">Close this page</a></p>
	
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -