Grille.htm
代码如下:
<style>
SAISIR
{
DefineInputOnClick: expression (this.onclick = function () {if (this.type == "bouton") {this.style.color = chooseColor ();}});
}
</ style>
<cript>
var igridrowCount = 0;
var igridColCount = 0;
fonction 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)
ot
if (definefirstcolbgcolorid.style.color)
ot
if (definecurrowbgcolorid.style.color)
ot
if (definecurcolbgcolorid.style.color)
ot
if (DefileCureditbgColorid.style.color)
ot
pour (MindEx = 0; MindEx <igridrowcount; MindEx ++)
{
var vtr = vTable.insertrow (MindEx);
pour (nindex = 0; nindex <igridcolcount; nindex ++)
{
vtd = vtr.insertCell (nindex);
vtd.innerText = "行" + MindEx + "列" + nindex;
}
}
Divid.ApendChild (VTable);
}
fonction chooseColor ()
{
var strcolor = dlghelper.choosecolordlg ();
strcolor = strcolor.tostring (16);
if (strcolor.length <6)
{
var stempsstring = "000000" .Substring (0,6-strcolor.length);
strcolor = stempsstring.concat (strcolor);
}
retour strcolor;
}
</cript>
<div id = "divid"> </div>
<object id = "dlghelper" classid = "ClSid: 3050f819-98b5-11cf-bb82-00aa00bdce0b"> </ objet>
<Fieldset>
<bouton onclick = "window.confirm ('已实现功能')"> Grille 参数区 </futton> <br>
<input type = Button Value = "表格背景" id = "DefinegridbgColorid"> <br>
<entrée type = Button Value = "头行背景" id = "DefineFirStrowBgColorid"> <br>
<entrée type = Button Value = "头列背景" id = "DefineFirstColBgColorid"> <br>
<input type = Button Value = "当前选择行背景" id = "DeficurrowBgColorid"> <br>
<input type = Button Value = "当前选择列背景" id = "DeficurColBgColorid"> <br>
<input type = Button Value = "当前选择编辑单元格背景" id = "DeficureditBgColorid"> <br>
<bouton onclick = "window.confirm ('未实现功能')"> 保留功能区 </futton> <br>
<input type = Text Value = "" id = "DefinegridRowCount"> <Button onClick = "iGridrowCount = DefinegridRowcount.value;"> 行数 </futton> <br>
<input type = Text Value = "" id = "DefinegridColCount"> <Button onClick = "iGridColCount = DefinegridColCount.value;"> 列数 </futton> <br>
<entrée type = radio> 是 <Type d'entrée = radio> 否启动行调整 <br>