Grid.htm
代码如下:
<estilo>
ENTRADA
{
DefineInputOnClick: Expression (this.OnClick = function () {if (this.type == "Button") {this.style.color = Choosecolor ();}});
}
</style>
<Cript>
var iGridRowCount = 0;
var iGridColCount = 0;
função createGrid ()
{
Divid.innerhtml = "";
if (iGridRowCount == 0) {iGridRowCount = 5;}
if (iGridColCount == 0) {iGridColCount = 5;}
var vtable = document.createElement ("tabela");
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 (definitivamenteCurrowbgcolorid.style.color)
{vtable.defineCurrowbgColor = definitivamenteCurrowbgColorid.style.color;}
if (definitivamentecurcolbgcolorid.style.color)
{vtable.definecurcolbgColor = definitivamenteCURCOLBGCOLORID.STYLE.COLOR;}
if (definitivamente
{vtable.DefineReditBgColor = Definitivamente
for (MINDEX = 0; MINDEX <IGRIDROWCOUNT; MINDEX ++)
{
var vtr = vtable.insertrow (MINDEX);
for (nindex = 0; nindex <iGridColCount; nindex ++)
{
vtd = vtr.insertCell (nindex);
vtd.innerText = "行"+mendex+"列"+nindex;
}
}
Divid.appendChild (vtable);
}
função 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);
}
retornar strcolor;
}
</script>
<div id = "divid"> </div>
<objeto id = "dlghelper" ClassID = "CLSID: 3050F819-98B5-11CF-BB82-00AA00BDCE0B"> </Object>
<Fieldset>
<button onclick = "window.confirm ('已实现功能')"> grade 参数区 </button> <br>
<Tipo de entrada = Button value = "表格背景" id = "DefineGridBGColorid"> <br>
<Tipo de entrada = Button value = "头行背景" id = "definefirstrowbgcolorid"> <br>
<Tipo de entrada = Button value = "头列背景" id = "definefirstcolbgcolorid"> <br>
<Tipo de entrada = Button value = "当前选择行背景" id = "DefinCurRowBGCOLORID"> <br>
<Tipo de entrada = Button value = "当前选择列背景" id = "definitivamenteCURCOLBGCOLORID"> <br>
<Tipo de entrada = Button value = "当前选择编辑单元格背景" id = "DefinilEcureiTBGCOLORID"> <br>
<button onclick = "window.confirm ('未实现功能')"> 保留功能区 </button> <br>
<Tipo de entrada = Valor do texto = "" id = "defineGridRowCount"> <botão onclick = "iGridRowCount = DefineGridRowCount.Value;"> 行数 </button> <br>
<Tipo de entrada = Valor do texto = "" id = "DefineGridColCount"> <botão onclick = "iGridColCount = DefineGridColCount.Value;"> 列数 </button> <br>
<Tipo de entrada = Radio> 是 <Tipo de entrada = Radio> 否启动行调整 <br>