国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > HTML > 正文

Web上功能強大的DbGrid表格HTC組件[只需在Table中指定樣式就可以完

2024-08-26 00:15:53
字體:
來源:轉載
供稿:網友

Grid.htm
代碼如下:
<style>
INPUT
{
DefineINPUTOnClick:expression(this.onclick=function(){if(this.type=="button"){this.style.color=chooseColor();}});
}
</style>
<script>
var iGridRowCount=0;
var iGridColCount=0;
function createGrid()
{
DivID.innerHTML="";
if(iGridRowCount==0){iGridRowCount=5;}
if(iGridColCount==0){iGridColCount=5;}
var vTable=document.createElement("table");
vTable.style.behavior="url(Grid.htc)";
if(defineGridBgColorID.style.color)
{vTable.defineGridBgColor=defineGridBgColorID.style.color;}
if(defineFirstRowBgColorID.style.color)
{vTable.defineFirstRowBgColor=defineFirstRowBgColorID.style.color;}
if(defineFirstColBgColorID.style.color)
{vTable.defineFirstColBgColor=defineFirstColBgColorID.style.color;}
if(defineCurRowBgColorID.style.color)
{vTable.defineCurRowBgColor=defineCurRowBgColorID.style.color;}
if(defineCurColBgColorID.style.color)
{vTable.defineCurColBgColor=defineCurColBgColorID.style.color;}
if(defineCurEditBgColorID.style.color)
{vTable.defineCurEditBgColor=defineCurEditBgColorID.style.color;}
for(mIndex=0;mIndex<iGridRowCount;mIndex++)
{
var vTr=vTable.insertRow(mIndex);
for(nIndex=0;nIndex<iGridColCount;nIndex++)
{
vTd=vTr.insertCell(nIndex);
vTd.innerText="行"+mIndex+"列"+nIndex;
}
}
DivID.appendChild(vTable);
}
function chooseColor()
{
var strColor=DlgHelper.ChooseColorDlg();
strColor=strColor.toString(16);
if(strColor.length<6)
{
var sTempString="000000".substring(0,6-strColor.length);
strColor=sTempString.concat(strColor);
}
return strColor;
}
</script>
<div id="DivID"></div>
<object id="DlgHelper" classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0px" height="0px"></object>
<fieldset>
<button onclick="window.confirm('已實現功能')">Grid參數區</button><br>
<input type=button value="表格背景" id="defineGridBgColorID"><br>
<input type=button value="頭行背景" id="defineFirstRowBgColorID"><br>
<input type=button value="頭列背景" id="defineFirstColBgColorID"><br>
<input type=button value="當前選擇行背景" id="defineCurRowBgColorID"><br>
<input type=button value="當前選擇列背景" id="defineCurColBgColorID"><br>
<input type=button value="當前選擇編輯單元格背景" id="defineCurEditBgColorID"><br>
<button onclick="window.confirm('未實現功能')">保留功能區</button><br>
<input type=text value="" id="defineGridRowCount"><button onclick="iGridRowCount=defineGridRowCount.value;">行數</button><br>
<input type=text value="" id="defineGridColCount"><button onclick="iGridColCount=defineGridColCount.value;">列數</button><br>
<input type=radio>是<input type=radio>否啟動行調整<br>

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 乌拉特中旗| 德江县| 商丘市| 云霄县| 枣庄市| 志丹县| 南宁市| 阳新县| 壶关县| 长春市| 白银市| 县级市| 香格里拉县| 香河县| 黔南| 沅陵县| 巴塘县| 盈江县| 普定县| 永年县| 治多县| 松滋市| 黄平县| 龙江县| 祁东县| 武山县| 五常市| 太仓市| 板桥市| 安溪县| 新蔡县| 万载县| 阳谷县| 新乡县| 永清县| 松滋市| 沙洋县| 民勤县| 府谷县| 宝坻区| 泰来县|