📄 cellprops.htm
字号:
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>单元格属性
-</title>
<SCRIPT LANGUAGE="JScript.Encode">
var tempbordercolor="Default";
var tempbackgroundcolor="Default";
var color_value="";
var color_status=0;
function getcolorfrommoondowner(currentcolor){
color_value=currentcolor;
window.showModalDialog("color.htm",window,"dialogHeight: 250px; dialogWidth: 520px; help: no;scroll: no; status: no");
var x=color_value;return x;
}
function loadcellclasses(){
var x=window.dialogArguments;
var xclasses=x.CellClasses;
if(xclasses!=""){
if(xclasses.indexOf("|")>0){
var classarray=xclasses.split("|");
for(var i=1;i<=classarray.length;i++){
var classoption=window.document.createElement("OPTION");
window.document.moondownerform.cellstyle.options.add(classoption);
classoption.innerText=classarray[i-1];
classoption.value=classarray[i-1];
}
}else{
var classoption=window.document.createElement("OPTION");
window.document.moondownerform.cellstyle.options.add(classoption);
classoption.innerText=xclasses;classoption.value=xclasses;
}
}
}
function setattributes(){
var x=window.dialogArguments;
x.tablewidthspecified="yes";
if(window.document.moondownerform.widthspecified.checked==false){
x.tablewidthspecified="no";
}
x.tablewidth="";
if(isNaN(parseInt(window.document.moondownerform.tablewidth.value))==false){x.tablewidth=parseInt(window.document.moondownerform.tablewidth.value);}
var tempx="";
if(window.document.moondownerform.widthtype[0].checked==true){tempx="pixels";}
if(window.document.moondownerform.widthtype[1].checked==true){tempx="percentage";}
x.tablewidthtype=tempx;
var alignindex=window.document.moondownerform.horizontalalign.selectedIndex;
x.tablealign=window.document.moondownerform.horizontalalign.options[alignindex].value;
var valignindex=window.document.moondownerform.verticalalign.selectedIndex;
x.tablevalign=window.document.moondownerform.verticalalign.options[valignindex].value;
var tablestyleindex=window.document.moondownerform.cellstyle.selectedIndex;
x.tablecellclass="";
if(tablestyleindex!=0){x.tablecellclass=window.document.moondownerform.cellstyle.options[tablestyleindex].value;}
x.tablebordercolor=tempbordercolor;
x.tablebackgroundcolor=tempbackgroundcolor;
x.tableiscancel="no";
x.tableisinsert="yes";
x.table_status=0;
x.tablemoondowneropen=0;window.close();
}
function bye(){
var x=window.dialogArguments;
x.table_status=0;
x.tableiscancel="yes";
x.tableisinsert="no";
window.close();
}
function clearme(){
var x=window.dialogArguments;
x.table_status=0;
}
function initmoondowner(){
var x=window.dialogArguments;
if(x.tablewidthspecified=="yes"){
window.document.moondownerform.widthspecified.checked=true;
}else{
window.document.moondownerform.widthspecified.checked=false;
}
var s1=""+x.tablewidth;
if(s1.indexOf("%")!=-1){
window.document.moondownerform.widthtype[1].checked=true;
}else{
window.document.moondownerform.widthtype[0].checked=true;
}
if(x.tablewidth!=""&&isNaN(parseInt(x.tablewidth))!=true){
window.document.moondownerform.tablewidth.value=parseInt(x.tablewidth);
}else{
window.document.moondownerform.tablewidth.value="";
}
var s2=""+x.tablealign;s2=s2.toUpperCase();
if(s2=="LEFT"){
window.document.moondownerform.horizontalalign.options[1].selected=true;
}else if(s2=="CENTER"){
window.document.moondownerform.horizontalalign.options[2].selected=true;
}else if(s2=="RIGHT"){
window.document.moondownerform.horizontalalign.options[3].selected=true;
}else if(s2=="JUSTIFY"){
window.document.moondownerform.horizontalalign.options[4].selected=true;
}else{
window.document.moondownerform.horizontalalign.options[0].selected=true;
}
var s3=""+x.tablevalign;s3=s3.toUpperCase();
if(s3=="TOP"){
window.document.moondownerform.verticalalign.options[1].selected=true;
}else if(s3=="MIDDLE"){
window.document.moondownerform.verticalalign.options[2].selected=true;
}else if(s3=="BASELINE"){
window.document.moondownerform.verticalalign.options[3].selected=true;
}else if(s3=="BOTTOM"){
window.document.moondownerform.verticalalign.options[4].selected=true;
}else{
window.document.moondownerform.verticalalign.options[0].selected=true;
}
if(x.tablebordercolor!=""&&x.tablebordercolor!=null){
tempbordercolor=x.tablebordercolor;
window.document.all.item("bordercolortable").bgColor=x.tablebordercolor;
}
if(x.tablebackgroundcolor!=""&&x.tablebackgroundcolor!=null){
tempbackgroundcolor=x.tablebackgroundcolor;
window.document.all.item("backgroundcolortable").bgColor=x.tablebackgroundcolor;
}
loadcellclasses();
var tclass=x.tablecellclass;
var classlength=window.document.moondownerform.cellstyle.length;
var zclass="";
for(zcount=0;zcount<=classlength-1;zcount++){
zclass=window.document.moondownerform.cellstyle.options[zcount].value;
if(zclass==tclass){
window.document.moondownerform.cellstyle[zcount].selected=true;
}
}
}
function showCol(i) {
col = websn_getTblCol();
if (col != "" && col != null) {
if (i==1){
window.document.all.item("bordercolortable").bgColor=col;
tempbordercolor=col;
}else{
window.document.all.item("backgroundcolortable").bgColor=col;
tempbackgroundcolor=col;
}
}
}
function websn_getTblCol() {
if (document.createAttribute) {
var retCol = window.dialogArguments.dlgColHelperTbl.ChooseColorDlg();
retCol = retCol.toString(16);
if (retCol.length < 6) {
var tmp = "000000".substring(0,6-retCol.length);
retCol = tmp.concat(retCol);
var c = 66;
}
}
else {
bascol = showModalDialog("colpick.html", "", "dialogWidth:350px; dialogHeight:370px; status:no; help:no");
if (bascol != null) {
retCol = bascol['col'];
}
}
return retCol;
}
function tcolor(){window.document.all.item("bordercolortable").bgColor="#FF0000";}
</SCRIPT>
<link rel="stylesheet" href="news_pup.css" type="text/css">
</head>
<body onLoad="initmoondowner();" onunload="clearme();">
<table border="0" cellspacing="5" cellpadding="4" width="98%" align="center">
<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="3">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="35">布局:</td>
<td><img vspace = "2" id="line2" border="0" src="line_divider.gif" width="100%" height="2"></td>
</tr>
</table>
</td>
</tr>
<form method="POST" name="moondownerform">
<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="80" valign="middle" align="right">水平对齐:
</td>
<td width="80" valign="middle">
<select size="1" name="horizontalalign">
<option value="Default">默认</option>
<option value="Left">居左</option>
<option value="Center">居中</option>
<option value="Right">居右</option>
</select>
</td>
<td valign="middle" align="right">
<input type="checkbox" name="widthspecified" value="ON" checked>
</td>
<td width="130" valign="middle" align="left">指定单元格宽度</td>
</tr>
<tr>
<td width="80" align="right" height="19">垂直对齐:
</td>
<td width="80" height="19">
<select size="1" name="verticalalign">
<option value="Default">默认</option>
<option value="Top">顶端</option>
<option value="Middle">居中</option>
<option value="Baseline">基线</option>
<option value="Bottom">底部</option>
</select>
</td>
<td align="right" height="19">
<input type="text" name="tablewidth" size="4" value="100">
</td>
<td width="130" valign="middle" align="left" height="19">
<input type="radio" value="pixels" name="widthtype">
像素
<input type="radio" value="percentage" checked name="widthtype">
百分比 </td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="35">颜色:</td>
<td><img vspace = "2" id="line2" border="0" src="line_divider.gif" width="100%" height="2"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="320">
<table border="0" width="100%">
<tr>
<td width="80" valign="middle" align="right">边框颜色:</td>
<td valign="middle" align="left">
<table id="bordercolortable" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="100%" onClick="showCol(1);"><img border="0" src="clrbox.gif" width="16" height="16"></td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="80" valign="middle" align="right">背景颜色:</td>
<td valign="middle" align="left">
<table id="backgroundcolortable" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="100%" onClick="showCol(0);"><img border="0" src="clrbox.gif" width="16" height="16"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="35">样式:</td>
<td><img vspace = "2" id="line2" border="0" src="line_divider.gif" width="100%" height="2"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="320"> 单元格样式:
<select size="1" name="cellstyle">
<option value="Default">Default</option>
</select>
</td>
</tr>
<tr>
<td><img vspace = "2" id="line2" border="0" src="line_divider.gif" width="100%" height="2"></td>
</tr>
</form>
</table>
</td>
</tr>
<tr>
<td align="right">
<input type="button" value=" 确定 " name="btn_insert2" onClick="setattributes();">
<input type="button" value=" 取消 " name="btn_cancel" onClick="bye();">
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -