Grid.htm
代码如下::
<Styles>
EINGANG
{
DefineInputonClick: Ausdruck (this.onclick = function () {if (this.type == ") {this.style.color = choosecolor ();}});
}
</style>
<Script>
var igridrowcount = 0;
var igridcolcount = 0;
Funktion CREATEGRID ()
{
Divid.innerhtml = "";
if (igridrowcount == 0) {igridrowcount = 5;}
if (igridcolcount == 0) {igridcolcount = 5;}
var vtable = document.createelement ("Tabelle");
vtable.Style.Behavior = "url (grid.htc)";
if (definegridbgcolorid.style.color)
oder
if (definefirstrowbgcolorid.style.color)
oder
if (definefirstcolbgcolorid.style.color)
oder
if (defincurrowbgcolorid.style.color)
oder
if (defincurcolbgcolorid.style.color)
oder
if (definitivitbgcolorid.style.color)
oder
für (mindEx = 0; mindex <igridrowcount; mindEx ++)
{
var vtr = vtable.insertrow (mindEx);
für (nindex = 0; nindex <igridcolcount; nindex ++)
{
vtd = vtr.insertcell (nindex);
vtd.Innertext = "行"+mindex+"列"+nindex;
}
}
Divid.AppendChild (vtable);
}
Funktion 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"> </Object>
<Fieldset>
<button onclick = "window.confirm ('已实现功能')"> grid 参数区 </button> <br>
<Eingabe type = button value = "表格背景" id = "definegridbgcolorid"> <br>
<Eingabe type = button value = "头行背景" id = "DefineFirStrowBGColorid"> <br>
<Eingabe type = button value = "头列背景" id = "definefirstcolbgcolorid"> <br>
<Eingabe type = button value = "当前选择行背景" id = "defincurrowbgcolorid"> <br>
<Eingabe type = button value = "当前选择列背景" id = "defincurcolbgcolorid"> <br>
<Eingabe type = button value = "当前选择编辑单元格背景" id = "definceditbgcolorid"> <br>
<button onclick = "window.confirm ('未实现功能')"> 保留功能区 </button> <br>
<Eingabe type = Text value = "" id = "definegridrowcount"> <button onclick = "igridrowcount = definegridrowcount.Value;"> 行数 </button> <br>
<Eingabe type = text value = "" id = "definegridcolcount"> <button onclick = "igridcolcount = definegridcolcount.Value;"> 列数 </button> <br>
<Eingabetyp = Radio> 是 <Eingabetyp = Radio> 否启动行调整 <br>