📄 pubprocess.js
字号:
return null;
}
function lcGetLayerObject( layername, objname )
{
var fullname;
var layer;
if( document.layers ) {
layer = document.layers[ layername ];
fullname = "layer.document." + objname;
}
else if( document.all ) {
fullname = "document.all." + objname;
if( layername == szLayerOutput )
fullname = "frmInfopage." + fullname;
}
else
return null;
return eval( fullname );
}
function lcGetLayer(name)
{
var layer;
if( document.layers ) {
layer = document.layers[name];
return layer;
}
else if( document.all ) {
if( eval('document.all.' + name) != null ) {
layer = eval('document.all.' + name + '.style');
return layer;
}
else
return null;
}
else
return null;
}
function lcMoveLayer(name,x,y)
{
var layer = lcGetLayer(name);
if( layer != null ) {
if( document.layers ) {
layer.moveTo(x,y);
} else if( document.all ) {
layer.top = y
layer.left = x
}
}
}
function lcResizeLayer(name,w,h)
{
var layer = lcGetLayer(name);
if( layer != null ) {
if( document.layers ) {
layer.resize(w,h);
layer.document.open();
layer.document.writeln('<table bordercolor="red" border="1" width="' + w + '" height="' + h + '"><tr><td></td></tr></table>');
layer.document.close();
}
else if( document.all ) {
layer.width = w;
layer.height = h;
}
}
}
function lcChangeImgSrc( src )
{
imageSrc = src;
if( document.layers ) {
var layer = lcGetLayer( szLayerMapImage );
layer.document.open();
layer.document.writeln( '<img src=' + src + ' name=' + szImageMap + 'width=' + width + ' height=' + height + '>' );
layer.document.close();
}
else if( document.all ) {
var img = eval( 'document.all.' + szImageMap );
img.src = src;
}
}
function lcSetImgSize( name, w, h )
{
if( document.all )
{
var img = eval( 'document.all.' + name );
img.width = w;
img.height = h;
} else if( document.layer ) {
alert("null");
}
}
function lcChangeImgSize( w, h )
{
if( document.all )
{
var img = eval( 'document.all.' + szImageMap );
img.width = w;
img.height = h;
}
}
function lcHideLayer(name)
{
var layer = lcGetLayer(name);
if (layer != null) {
if (document.layers)
layer.visibility = "hide";
if (document.all)
layer.visibility = "hidden";
}
}
function lcShowLayer(name)
{
var layer = lcGetLayer(name);
if (layer != null) {
if (document.layers)
layer.visibility = "show";
if (document.all)
layer.visibility = "visible";
}
}
function lcReplaceLayerContent(name, content)
{
if(name == "layerOutput"){
nTextNum += 1;
aryTextResult[nTextNum] = content;
arySelCount[nTextNum] = nTableRows;
nTextIndex = nTextNum;
commTextBorwseSetting();
}
content = content.replace( /\'/g, "\\'" );
var str = "document.all." + name + ".innerHTML = '" + content + "'";
if( name == szLayerOutput )
str = "frmInfopage." + str;
eval(str);
}
function lcReplaceLayerContent2(name, content)
{
content = content.replace( /\'/g, "\\'" );
var str = "document.all." + name + ".innerHTML = '" + content + "'";
if( name == szLayerOutput )
str = "frmInfopage." + str;
eval(str);
}
function lcCreateInputLayer( left, top, width, height, visible, content)
{
Input_Left = left;
Input_Top = top;
blCommonPage = true;
lcCreateLayer( szLayerInput, left, top, width, height, visible, content);
}
function lcCreateOutputLayer( left, top, width, height, visible, content)
{
Output_Left = left;
Output_Top = top;
lcCreateLayer( szLayerOutput, left, top, width, height, visible, content);
}
function lcCreateMapLayer( l, t, w, h, border, szBGImg )
{
var content, contentBg;
left = l;
top = t;
width = w;
height = h;
Owidth = w;
Oheight = h;
if( szBGImg != "" )
{
content = '<img name="' + szImageMapAreaBg + '" src="' + szBGImg + '" width=' + width + ' height=' + height + ' border='+ border +'>';
lcCreateLayer( szLayerMapBackground, left-1, top-1, width , height, true, content );
}
content = '<img name="' + szImageMap + '" src="images/pixel.gif" width=' + width + ' height=' + height + ' border=1 onload="lcCtlLoad();">';
contentBg = '<img name="' + szImageMapBg + '" src="images/pixel.gif" width=' + width + ' height=' + height + ' border=1>';
if( document.all ) {
document.writeln( '<div id="layClip" style="position:absolute; width:' + width + 'px; height:' + height + 'px; left:' + left + 'px; top:' + top + 'px; clip: rect(0 ' + width + ' ' + height + ' 0);"> ' );
lcCreateLayer( szLayerMapImageBg, 0, 0, width, height, true, contentBg );
lcCreateLayer( szLayerMapImage, 0, 0, width, height, true, content );
document.writeln( '</div>' );
}
else if( document.layers )
{
lcCreateLayer( szLayerMapImage, left, top, width, height, true, content );
}
content = '<table bordercolor="red" border="2" width="100%" height="100%"><tr><td></td></tr></table>';
lcCreateLayer( szLayerBorder,1,1,1,1,false,content );
if( document.all )
{
for( var i=0; i < 10; i++ )
{
lcCreateLayer( 'div' + i, 1, 1, 1, 1, false, '<img name="img' + i + '" src="images/pixel.gif">' );
}
}
lcCreateLayer( 'divStart', 1, 1, 1, 1, false, '<img name="imgStart" src="images/pixel.gif">');
lcCreateLayer( 'divEnd', 1, 1, 1, 1, false, '<img name="imgEnd" src="images/pixel.gif">' );
//lcCreateLayer( 'divStart', 1, 1, 1, 1, false, '<img name="imgStart" src="images/startPt.gif">');
//lcCreateLayer( 'divEnd', 1, 1, 1, 1, false, '<img name="imgEnd" src="images/endPt.gif">' );
//lcCreateLayer( 'divMove', 1, 1, 1, 1, false, '<img name="imgMove" src="images/MovePt.gif">' );
var loadW = 115;
var loadH = 29;
content = "<img src=\"images/starting.gif\">";
lcCreateLayer(szLayerLoading, left+width/2-loadW/2, top+height/2-loadH/2, loadW, loadH, true, content );
lcCreateMaskLayer(szLayerMask, left, top, width, height, "");
}
function lcCtlLoad()
{
var img = eval( "document.all." + szImageMap);
var imgbg = eval( "document.all." + szImageMapBg );
if( img != null && img.src.indexOf("pixel.gif") <= 0) {
imgSrc = img.src;
imgbg.src = imgSrc;
tmp_ImgSrc = imgSrc;
lcSetImgSize( szImageMapBg, width, height );
lcMoveLayer( szLayerMapImageBg, 0, 0 );
}
}
function lcCreateBarLayer( left, top, bgWidth, bgHeight, btWidth, btHeight, bgImg, btImg )
{
var content;
blBarExit = true;
Bar_bgWidth = bgWidth;
Bar_bgHeight = bgHeight;
Bar_Width = btWidth;
Bar_Height = btHeight;
Bar_bgTop = top;
Bar_bgLeft = left;
Bar_Left = Bar_bgLeft +( Bar_bgWidth - Bar_Width )/2;
Bar_Top = Bar_bgTop +( Bar_bgHeight/2 ) - Bar_Height/2;
oBar_bgLeft = left;
oBar_bgHeight = bgHeight;
ifthereisbar="y"
content = "<img name=\"imgBgBar\" src="+ bgImg +" width="+ bgWidth +" height="+ bgHeight +">";
lcCreateLayer( szLayerBgBar, left, top, bgWidth, bgHeight, true, content);
content = "<img src="+ btImg +" width="+ btWidth +" height="+ btHeight +">";
lcCreateLayer( szLayerBar, left+(bgWidth-btWidth)/2, top+(bgHeight/2)-btHeight/2, btWidth, btHeight, true, content);
lcCreateMaskLayer(szLayerBarMask,left, top, bgWidth, bgHeight,"");
var layMask = eval("document.all." + szLayerBarMask);
layMask.style.cursor = "hand";
}
function lcResetLayerBar( w, h )
{
var temp1 = w - Owidth;
var temp2 = h - Oheight;
Bar_bgLeft = oBar_bgLeft + temp1;
Bar_bgHeight = oBar_bgHeight + temp2;
Bar_Left = Bar_bgLeft +( Bar_bgWidth - Bar_Width )/2;
Bar_Top = Bar_bgTop +( Bar_bgHeight/2 ) - Bar_Height/2;
lcMoveLayer( szLayerBgBar, Bar_bgLeft, Bar_bgTop );
lcMoveLayer( szLayerBar, Bar_Left, Bar_Top );
lcMoveLayer( szLayerBarMask, Bar_bgLeft, Bar_bgTop );
lcResizeLayer( szLayerBarMask, Bar_bgWidth, Bar_bgHeight );
lcSetImgSize( "imgBgBar", Bar_bgWidth, Bar_bgHeight );
}
function lcResetLayerAfterResizeImg( w, h )
{
var temp1 = w - Owidth;
var temp2 = h - Oheight;
var layer = lcGetLayer( "layClip" );
lcResizeLayer( szLayerMapBackground, w, h);
lcResizeLayer( "layClip", w, h);
lcResizeLayer( szLayerMapImage, w, h);
lcResizeLayer( szLayerMapImageBg, w, h);
lcResizeLayer( szLayerMask, w, h);
layer.clip = 'rect(0 ' + w + ' ' + h + ' 0)';
lcSetImgSize( szImageMapAreaBg, w, h );
lcSetImgSize( szImageMap, w, h );
width = w;
height = h;
}
function lcResetLayerLoading(l,t,w,h)
{
var loadW = 115;
var loadH = 29;
var Lleft = l;
var Ltop = t;
document.all.layLoading.style.pixelLeft = Lleft+(w-loadW)/2;
document.all.layLoading.style.pixelTop = Ltop+(h-loadH)/2;
}
function lcCreateMaskLayer(layerName,iLeft,iTop,iWidth,iHeight,content)
{
if (document.all) {
document.writeln('<div id="' + layerName + '" style="position:absolute; overflow:none; left:' + iLeft + 'px; top:' + iTop + 'px; width:' + iWidth + 'px; height:' + iHeight + 'px; visibility: visible; background-image: url(images/Pixel.gif); layer-background-image: url(images/Pixel.gif); border: 1px none #000000;">');
document.writeln(content);
document.writeln('</div>');
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -