📄 link_grid.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DHTML Grid samples. dhtmlXGrid - Extra Excell - Link Button</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.">
<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>
</head>
<style>
body {font-size:12px}
.{font-family:arial;font-size:12px}
h1 {cursor:hand;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>Extra Excell - Link Button</h1>
<p>
Here is an example of implementation of html links in dhtmlxGrid.
You can specify url or skip it. Also you can specify a target (_blank by default)
</p>
<table width="700">
<tr>
<td width="350">
<div id="gridbox" width="100%" height="250px" style="background-color:white;"></div>
</td>
<td valign="top">
<iframe name="iframe_a" style="width:250px;height:150px"></iframe><br>
All links except "Yanka Kupala" will be opened in new windows.<br>
"Yanka Kupala" will be opened in iframe
</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.setColTypes("ro,link");
...
mygrid.init();
mygrid.loadXML("grid_links.xml");
</script>
</XMP><br>
<strong>The corresponding cell value in XML should be a "^" delimited list of following values:</strong><br>
1st - Link Text<br>
2nd - URL (optional)<br>
3rd - target (optional, default is _blank)
<script>
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("../imgs/");
mygrid.setHeader("Author,Title");
mygrid.setInitWidths("150,150")
mygrid.setColAlign("left,left")
mygrid.setColTypes("ro,link");
mygrid.setColSorting("str,str")
mygrid.setColumnColor("white,#d5f1ff")
mygrid.init();
mygrid.loadXML("grid_links.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 + -