📄 table.aspx
字号:
<%@ Page language="c#" AutoEventWireup="true" %>
<%@ Import Namespace="DotNetTextBox" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<HEAD>
<meta http-equiv="Pragma" content="no-cache">
<base target="_self" />
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="stylesheet3.css" rel="stylesheet" type="text/css" />
<script runat="server" Language="C#">
private void Page_Load(object sender, System.EventArgs e)
{
if (Request.Cookies["languages"] != null)
{
ResourceManager.SiteLanguageKey = Request.Cookies["languages"].Value;
}
else
{
ResourceManager.SiteLanguageKey = HttpContext.Current.Request.ServerVariables["HTTP_ACCEPT_LANGUAGE"].ToLower().Split(',')[0];
}
}
</script>
<script language="JavaScript">
(function () {
if (! window.Window) return;
Window.constructor.prototype.__defineGetter__("event", function(){
var o = arguments.callee.caller;
var e;
while(o != null){
e = o.arguments[0];
if(e && (e.constructor == Event || e.constructor == MouseEvent)) return e;
o = o.caller;}
return null;});})();
var userAgent = navigator.userAgent.toLowerCase();
var is_ie = (userAgent.indexOf('msie') != -1);
function $()
{
var elements = new Array();
for (var i = 0; i < arguments.length; i++)
{
var element = arguments[i];
if (typeof element == 'string')
element = document.getElementById(element);
if (arguments.length == 1)
return element;
elements.push(element);
}
return elements;
}
var tables = new Array;
var sAction;
var sTitle;
var oSeletion;
var sRangeType;
var sRow = "1";
var sCol = "1";
var sAlign = "";
var sBorder = "1";
var sCellPadding = "3";
var sCellSpacing = "2";
var sWidth = "";
var sBorderColor = "#cccccc";
var sBgColor = "#ffffff";
var sWidthUnit = "%";
var bCheck = true;
var bWidthDisable = false;
var sWidthValue = "100";
var popMenu = new dhLayer();
var ecolorPopup=null;
function colordialogmouseout(obj){
obj.style.borderColor="";
obj.bgColor="";}
function colordialogmouseover(obj){
obj.style.borderColor="#0A66EE";
obj.bgColor="#EEEEEE";}
function colordialogmousedown(color,type)
{
$("d_"+type).value=color;
$("s_"+type).style.backgroundColor=color;
popMenu.hide();
}
function colordialogmore(type)
{
//var color=prompt("请输入其它颜色的代码或名称: ","#FFFFFF");
alert('<%=ResourceManager.GetString("colorcode")%>');
//if (!color) return;
$("d_"+type).value='';
$("d_"+type).focus();
//$("s_"+type).style.backgroundColor=color;
popMenu.hide();
}
function colordialog(type){
var e=event.srcElement? event.srcElement : event.target;
e.onkeyup=colordialog;
ecolorPopup=e;
var ocbody;
var colorlist=new Array(40);
popMenu.border = "solid #999999 1px";
colorlist[0]="#000000"; colorlist[1]="#993300"; colorlist[2]="#333300"; colorlist[3]="#003300";
colorlist[4]="#003366"; colorlist[5]="#000080"; colorlist[6]="#333399"; colorlist[7]="#333333";
colorlist[8]="#800000"; colorlist[9]="#FF6600"; colorlist[10]="#808000";colorlist[11]="#008000";
colorlist[12]="#008080";colorlist[13]="#0000FF";colorlist[14]="#666699";colorlist[15]="#808080";
colorlist[16]="#FF0000";colorlist[17]="#FF9900";colorlist[18]="#99CC00";colorlist[19]="#339966";
colorlist[20]="#33CCCC";colorlist[21]="#3366FF";colorlist[22]="#800080";colorlist[23]="#999999";
colorlist[24]="#FF00FF";colorlist[25]="#FFCC00";colorlist[26]="#FFFF00";colorlist[27]="#00FF00";
colorlist[28]="#00FFFF";colorlist[29]="#00CCFF";colorlist[30]="#993366";colorlist[31]="#CCCCCC";
colorlist[32]="#FF99CC";colorlist[33]="#FFCC99";colorlist[34]="#FFFF99";colorlist[35]="#CCFFCC";
colorlist[36]="#CCFFFF";colorlist[37]="#99CCFF";colorlist[38]="#CC99FF";colorlist[39]="#FFFFFF";
ocbody = "";
ocbody += "<table CELLPADDING=0 CELLSPACING=3>";
ocbody += "<tr height='20' width='20'><td align='center'><table style='border:1px solid #808080;' width='12' height='12' bgcolor='"+$("d_"+type).value+"'><tr><td></td></tr></table></td><td bgcolor='eeeeee' colspan='7' style='font-size:12px;' align='center'><%=ResourceManager.GetString("nowcolor")%></td></tr>";
for(var i=0;i<colorlist.length;i++){
if(i%8==0)
ocbody += "<tr>";
ocbody += "<td width='14' height='16' style='border:1px solid;' onMouseOut='parent.colordialogmouseout(this);' onMouseOver='parent.colordialogmouseover(this);' onMouseDown='parent.colordialogmousedown(\""+colorlist[i]+"\",\""+type+"\")' align='center' valign='middle'><table style='border:1px solid #808080;' width='12' height='12' bgcolor='"+colorlist[i]+"'><tr><td></td></tr></table></td>";
if(i%8==7)
ocbody += "</tr>";}
ocbody += "<tr><td align='center' height='22' colspan='8' onMouseOut='parent.colordialogmouseout(this);' onMouseOver='parent.colordialogmouseover(this);' style='border:1px solid;font-size:12px;cursor:default;' onMouseDown='parent.colordialogmore(\""+type+"\")'><%=ResourceManager.GetString("customcolor")%></td></tr>";
ocbody += "</table>";
popMenu.content = ocbody;
popMenu.show(158,147,document.body);}
function dhLayer(){
var dh = this;
this.content = null;
this.background = "#f9f8f7";
this.border = null;
this.fontSize = "12px";
this.padding = "0px";
this.cursor = "pointer";
if(is_ie){
var layer = window.createPopup();
}else{
var layer = document.createElement("DIV");}
this.show = function(w,h,o){
if(is_ie){
var l = document.body.scrollLeft+event.clientX;
var t = document.body.scrollTop+event.clientY;
layer.document.body.innerHTML = this.content;
layer.document.body.oncontextmenu = function(){return false};
layer.document.body.style.background = this.background;
layer.document.body.style.border = this.border;
layer.document.body.style.fontSize = this.fontSize;
layer.document.body.style.padding = this.padding;
layer.document.body.style.cursor = this.cursor;
layer.show(l,t,w,h,o);
}else{
w = w+"px";
h = h+"px";
var l = window.event.clientX+"px";
var t = window.event.clientY+"px";
layer.id = "dhLayer";
layer.innerHTML = this.content;
layer.style.background = this.background;
layer.style.border = this.border;
layer.style.fontSize = this.fontSize;
layer.style.zIndex = "99";
layer.style.width = w;
layer.style.height = h;
layer.style.position = "absolute";
layer.style.left = l;
layer.style.top = t;
layer.style.padding = this.padding;
layer.style.cursor = this.cursor;
layer.style.display = "block";
if(document.getElementById('dhLayer')!=null){
o.replaceChild(layer,document.getElementById('dhLayer'));
}else{
o.appendChild(layer);}}}
this.hide = function(){
if(is_ie){
layer.hide();
}else{
layer.style.display = "none";}}}
if(is_ie)
{
if (dialogArguments!=null)
{
tables = dialogArguments;
sAction = "MOD";
sTitle = '<%=ResourceManager.GetString("moftable")%>';
sRow= tables[0];
sCol= tables[1];
sAlign=tables[2];
sBorder=tables[3];
sBgColor=tables[4];
sCellPadding=tables[5];
sCellSpacing=tables[6];
sBorderColor=tables[7];
sWidth =tables[8];
}
else
{
sAction = "INSERT";
sTitle = '<%=ResourceManager.GetString("inserttable")%>';
}
}
else
{
tables=window.opener.GetTable();
if(tables[0]!=null)
{
sAction = "MOD";
sTitle = '<%=ResourceManager.GetString("moftable")%>';
sRow= tables[0];
sCol= tables[1];
sAlign=tables[2];
sBorder=tables[3];
sBgColor=tables[4];
sCellPadding=tables[5];
sCellSpacing=tables[6];
if(tables[7]==null)
{
sBorderColor="#cccccc";
}
else
{
sBorderColor=tables[7];
}
sWidth =tables[8];
}
else
{
sAction = "INSERT";
sTitle = '<%=ResourceManager.GetString("inserttable")%>';
}
}
document.write("<TITLE>" + sTitle + "</TITLE>");
function InitDocument(){
SearchSelectValue($("d_align"), sAlign.toLowerCase());
if (sAction == "MOD"){
if (sWidth == ""){
bCheck = false;
bWidthDisable = true;
sWidthValue = "100";
sWidthUnit = "%";
}else{
bCheck = true;
bWidthDisable = false;
if (sWidth.substr(sWidth.length-1) == "%"){
sWidthValue = sWidth.substring(0, sWidth.length-1);
sWidthUnit = "%";
}else{
sWidthUnit = "";
sWidthValue = parseInt(sWidth);
if (isNaN(sWidthValue)) sWidthValue = "";
}
}
}
switch(sWidthUnit){
case "%":
$("d_widthunit").selectedIndex = 1;
break;
default:
sWidthUnit = "";
$("d_widthunit").selectedIndex = 0;
break;
}
$("d_row").value = sRow;
$("d_col").value = sCol;
$("d_border").value = sBorder;
$("d_cellspacing").value = sCellSpacing;
$("d_cellpadding").value = sCellPadding;
$("d_widthvalue").value = sWidthValue;
$("d_widthvalue").disabled = bWidthDisable;
$("d_widthunit").disabled = bWidthDisable;
$("d_bordercolor").value = sBorderColor;
$("s_bordercolor").style.backgroundColor = sBorderColor;
$("d_bgcolor").value = sBgColor;
$("s_bgcolor").style.backgroundColor = sBgColor;
$("d_check").checked = bCheck;
}
function SearchSelectValue(o_Select, s_Value){
for (var i=0;i<o_Select.length;i++){
if (o_Select.options[i].value == s_Value){
o_Select.selectedIndex = i;
return true;
}
}
return false;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -