国产探花免费观看_亚洲丰满少妇自慰呻吟_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>

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 阿城市| 潜江市| 陆川县| 云阳县| 榕江县| 大庆市| 赤壁市| 南丹县| 逊克县| 全州县| 仪陇县| 临夏县| 漠河县| 澜沧| 凌源市| 九江县| 上饶市| 梅河口市| 沙河市| 钟山县| 阳城县| 安国市| 德州市| 溧阳市| 贡嘎县| 淮北市| 云龙县| 邢台市| 杭锦旗| 绥滨县| 孟津县| 永德县| 广元市| 曲麻莱县| 常州市| 从江县| 崇礼县| 渑池县| 灵石县| 镶黄旗| 万全县|