Cuadrícula.htm
代码如下:
<estilo>
APORTE
{
DefineInputOnClick: Expression (this.OnClick = function () {if (this.type == "botón") {this.style.color = chooseColor ();}});
}
</style>
<script>
var igidrowCount = 0;
var iGridcolcount = 0;
function CreateRid ()
{
Divid.innerhtml = "";
if (IgridrowCount == 0) {IgridrowCount = 5;}
if (IgridColCount == 0) {IgridColCount = 5;}
var vtable = document.createElement ("tabla");
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 (definitivamente
{vtable.definecurrowbgcolor = definreCurroWbgColorid.style.color;}
if (definidoCURCOLBGCOLORID.style.color)
{vtable.definecurcolbgcolor = defineCurColbgColorid.style.color;}
if (definitivamente
{VTable.DefINECUDITBGCOLOR = definitivamente
para (nindEx = 0; MindEx <IgridrowCount; MindEx ++)
{
var vtr = vtable.inserTrow (nindEx);
para (nindex = 0; nindex <iGridColCount; nindex ++)
{
vtd = vtr.insertcell (nindex);
vtd.inntext = "行"+MindEx+"列"+nindex;
}
}
Divid.appendChild (vTable);
}
función 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);
}
devolver strcolor;
}
</script>
<div id = "divid"> </div>
<Object id = "dlghelper" classid = "clsid: 3050F819-98B5-11CF-BB82-00AA00BDCE0B"> </Object>
<FieldSet>
<Button onClick = "Window.confirm ('已实现功能')"> Grid 参数区 </boton> <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 = "DefinCurroWBGColorId"> <br>
<input type = button value = "当前选择列背景" id = "definitivamente
<input type = button value = "当前选择编辑单元格背景" id = "definitivamente
<Button onClick = "Window.confirm ('未实现功能')"> 保留功能区 </boton> <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;"> 列数 </botón> <br>
<input type = radio> 是 <input type = radio> 否启动行调整 <br>