📄 tableprops.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 loadtableclasses(){
var x=window.dialogArguments;
var xclasses=x.TableClasses;
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.tablestyle.options.add(classoption);
classoption.innerText=classarray[i-1];
classoption.value=classarray[i-1];
}
}else{
var classoption=window.document.createElement("OPTION");
window.document.moondownerform.tablestyle.options.add(classoption);
classoption.innerText=xclasses;
classoption.value=xclasses;
}
}
}
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 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.align.selectedIndex;
x.tablealign=window.document.moondownerform.align.options[alignindex].value;
x.tablebordersize="1";
if(isNaN(parseInt(window.document.moondownerform.bordersize.value))==false){x.tablebordersize=parseInt(window.document.moondownerform.bordersize.value);}
x.tablecellpadding="1";
if(isNaN(parseInt(window.document.moondownerform.cellpadding.value))==false){x.tablecellpadding=parseInt(window.document.moondownerform.cellpadding.value);}
x.tablecellspacng="1";
if(isNaN(parseInt(window.document.moondownerform.cellspacing.value))==false){x.tablecellspacing=parseInt(window.document.moondownerform.cellspacing.value);}
var tablestyleindex=window.document.moondownerform.tablestyle.selectedIndex;
x.tableclass="";
if(tablestyleindex!=0){x.tableclass=window.document.moondownerform.tablestyle.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.align.options[1].selected=true;
}else if(s2=="CENTER"){
window.document.moondownerform.align.options[2].selected=true;
}else if(s2=="RIGHT"){
window.document.moondownerform.align.options[3].selected=true;
}else{
window.document.moondownerform.align.options[0].selected=true;
}
if(x.tablebordersize!=""&&x.tablebordersize!=null){
window.document.moondownerform.bordersize.value=(parseInt(x.tablebordersize));
}else{
window.document.moondownerform.bordersize.value="";
}
if(x.tablecellpadding!=""&&x.tablecellpadding!=null){
window.document.moondownerform.cellpadding.value=x.tablecellpadding;
}else{
window.document.moondownerform.cellpadding.value="";
}
if(x.tablecellspacing!=""&&x.tablecellspacing!=null){
window.document.moondownerform.cellspacing.value=x.tablecellspacing;
}else{
window.document.moondownerform.cellspacing.value="";
}
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;
}
loadtableclasses();
var tclass=x.tableclass;
var classlength=window.document.moondownerform.tablestyle.length;
var zclass="";
for(zcount=0;zcount<=classlength-1;zcount++){
zclass=window.document.moondownerform.tablestyle.options[zcount].value;
if(zclass==tclass){
window.document.moondownerform.tablestyle[zcount].selected=true;
}
}
}
function tcolor(){
window.document.all.item("bordercolortable").bgColor="#FF0000";
}
function checkkey(x){if(x=="13"){setattributes();}}
</SCRIPT>
<link rel="stylesheet" href="news_pup.css" type="text/css">
</head>
<body onLoad="initmoondowner();" onunload="clearme();" onkeydown="return checkkey(event.keyCode);">
<table border="0" width="96%" cellspacing="0" cellpadding="3" align="center">
<form method="POST" name="moondownerform">
<tr>
<td width="100%" colspan="2" height="96"> <table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td colspan="2" valign="middle" align="right"> <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 valign="middle" align="right">
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td width="45%" valign="middle" align="right"><font face="MS Sans Serif" size="2">对齐方式: </font></td>
<td width="55%" valign="middle" align="left"> <select size="1" name="align">
<option value="Default">默认</option>
<option value="Left">居左</option>
<option value="Center">居中</option>
<option value="Right">居右</option>
</select> </td>
</tr>
<tr>
<td width="45%" valign="middle" align="right">单元格边距:</td>
<td width="55%" valign="middle" align="left"> <input type="text" name="cellpadding" size="7" value="1">
</td>
</tr>
<tr>
<td width="45%" valign="middle" align="right">单元格间距:</td>
<td width="55%" valign="middle" align="left"> <input type="text" name="cellspacing" size="7" value="1">
</td>
</tr>
</table>
</td>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="8%" align="right"> <input type="checkbox" name="widthspecified" value="ON" checked>
</td>
<td width="92%">指定表格宽度</td>
</tr>
<tr>
<td width="8%" align="center"> <input type="text" name="tablewidth" size="4" value="100">
</td>
<td width="92%"> <table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="10%" valign="middle" align="right"> <input type="radio" value="pixels" name="widthtype">
</td>
<td width="90%">像素</td>
</tr>
<tr>
<td width="10%" valign="middle" align="right"> <input type="radio" value="percentage" checked name="widthtype">
</td>
<td width="90%">百分比</td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr>
<td width="100%" colspan="2"> <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="50%" height="22"> <table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="51%" valign="middle" align="right">边框大小:</td>
<td width="49%" valign="middle" align="left"> <input type="text" name="bordersize" size="7" value="0">
</td>
</tr>
</table></td>
<td width="50%" height="22"> <table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="72%" 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></td>
</tr>
<tr>
<td width="50%"> </td>
<td width="50%"> <table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="72%" valign="middle" align="right">背景颜色:</td>
<td width="28%" 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 width="100%" colspan="2"> <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="50%" align="right">表格样式:</td>
<td width="50%"> <select size="1" name="tablestyle">
<option value="Default">默认</option>
</select> </td>
</tr>
<tr>
<td colspan="2" align="center"><img vspace = "2" id="line2" border="0" src="line_divider.gif" width="100%" height="2"></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="button" value=" 确 定 " name="btn_insert" onClick="setattributes();">
<input type="button" value=" 取 消 " name="btn_cancel" onClick="bye();">
</td>
</tr>
</form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -