适合于IE6 SP1的无边框网页--仍然需要改进,但对于基本应用应该可用了

简介:

None.gif < HTML >
None.gif < meta  http-equiv ="Content-Type"  content ="text/html; charset=gb2312" >
None.gif < title >Chromeless Window </ title >
None.gif
ExpandedBlockStart.gif < SCRIPT  LANGUAGE ="JScript" >
ExpandedSubBlockStart.gif
/*
InBlock.gif This following code are designed and writen by Windy_sk <windy_sk@126.com>
InBlock.gif You can use it freely, but u must held all the copyright items!
InBlock.gif 2003-12-23 modified
InBlock.gif Special Thanks For andot
ExpandedSubBlockEnd.gif
*/

InBlock.gif
InBlock.gif
InBlock.gif
var CW_width    = 400;
InBlock.gif
var CW_height    = 300;
InBlock.gif
var CW_top    = 100;
InBlock.gif
var CW_left    = 100;
InBlock.gif
var CW_url    = "./default.htm";
InBlock.gif
var New_CW    = window.createPopup();
InBlock.gif
var CW_Body    = New_CW.document.body;
InBlock.gif
var content    = "";
InBlock.gif
var CSStext    = "margin:1px;color:black; border:2px outset;border-style:expression(onmouseout=onmouseup=function(){this.style.borderStyle='outset'}, onmousedown=function(){if(event.button!=2)this.style.borderStyle='inset'});background-color:buttonface;width:16px;height:14px;font-size:12px;line-height:11px;cursor:Default;";
InBlock.gif
ExpandedSubBlockStart.gif
function insert_content(){
InBlock.gif    
var temp = "";
InBlock.gif    CW_Body.style.overflow        
= "hidden";
InBlock.gif    CW_Body.style.backgroundColor    
= "white";
InBlock.gif    CW_Body.style.border        
= "solid black 1px";
InBlock.gif    temp 
+= "<table width=100% height=100% cellpadding=0 cellspacing=0 border=0>";
InBlock.gif    temp 
+= "<tr style=';font-size:12px;background:#0099CC;height:20;cursor:default' ondblclick=\"Max.innerText=Max.innerText=='1'?'2':'1';parent.if_max=!parent.if_max;parent.show_CW();\" onmouseup='parent.drag_up(event)' onmousemove='parent.drag_move(event)' onmousedown='parent.drag_down(event)' onselectstart='return false' oncontextmenu='return false'>";
InBlock.gif    temp 
+= "<td style='color:#ffffff;padding-left:5px'> 无边框窗口 For IE6 SP1 </td>";
InBlock.gif    temp 
+= "<td style='color:#ffffff;padding-right:5px;' align=right>";
InBlock.gif    temp 
+= "<span id=Help  onclick=\"alert('无边框窗口 For IE6 SP1  -  Ver 1.0\\n\\n Source Code By Windy_sk\\n\\nSpecial Thanks For andot\\n\\n Second Edit by SGSOFT')\" style=\""+CSStext+"font-family:System;padding-right:2px;\">?</span>";
InBlock.gif    temp 
+= "<span id=Min   onclick='parent.New_CW.hide();parent.blur()' style=\""+CSStext+"font-family:Webdings;\" title='Minimum'>0</span>";
InBlock.gif    temp 
+= "<span id=Max   onclick=\"this.innerText=this.innerText=='1'?'2':'1';parent.if_max=!parent.if_max;parent.show_CW();\" style=\""+CSStext+"font-family:Webdings;\" title='Maximum'>1</span>";
InBlock.gif    temp 
+= "<span id=Close onclick='parent.opener=null;parent.close()' style=\""+CSStext+"font-family:System;padding-right:2px;\" title='Close'>x</span>";
InBlock.gif    temp 
+= "</td></tr><tr><td colspan=2>";
InBlock.gif    temp 
+= "<div>";
InBlock.gif    temp 
+= "<object id='include' style='overflow:scroll; HEIGHT: 100%; width:"+CW_width+"';border:0px' type='text/html' data='"+CW_url+"'></object>";
InBlock.gif    temp 
+= "</div>";
InBlock.gif    temp 
+= "</td></tr></table>";
InBlock.gif    CW_Body.innerHTML 
= temp;
ExpandedSubBlockEnd.gif}

ExpandedSubBlockStart.gif
/*
InBlock.gif原版函数,会出现脚本变量溢出错误
InBlock.gifinsert_content();
InBlock.gif
InBlock.gif
InBlock.gifvar if_max = true;
InBlock.giffunction show_CW(){
InBlock.gif    window.moveTo(10000, 10000);
InBlock.gif    if(if_max){
InBlock.gif        New_CW.show(CW_top, CW_left, CW_width, CW_height);
InBlock.gif        if(typeof(New_CW.document.all.include)!="undefined"){
InBlock.gif            New_CW.document.all.include.style.width = CW_width;
InBlock.gif            New_CW.document.all.Max.innerText = "1";
InBlock.gif        }
InBlock.gif        
InBlock.gif    }else{
InBlock.gif        New_CW.show(0, 0, screen.width, screen.height);
InBlock.gif        New_CW.document.all.include.style.width = screen.width;
InBlock.gif    }
InBlock.gif}
InBlock.gif
ExpandedSubBlockEnd.gif
*/

InBlock.gif
//----------------------------------------
ExpandedSubBlockStart.gif
/*
InBlock.gif修改后的函数,解决了脚本溢出问题,但是在WinXP下,多次重复点击,仍然有可能出现错误
ExpandedSubBlockEnd.gif
*/

InBlock.gif
var if_max = true;
InBlock.gifsetTimeout(
"insert_content()",500);
InBlock.gif
ExpandedSubBlockStart.gif
function show_CW(){
InBlock.gif    window.moveTo(
1000010000);
ExpandedSubBlockStart.gif    
if(if_max || New_CW.document.body.offsetWidth==screen.width && New_CW.document.body.offsetHeight==screen.height){
InBlock.gif        New_CW.show(CW_top, CW_left, CW_width, CW_height);
InBlock.gif        New_CW.document.all.include.style.width 
= CW_width;
InBlock.gif        New_CW.document.all.Max.innerText 
= 2;
ExpandedSubBlockStart.gif    }
else{
InBlock.gif        New_CW.show(
00, screen.width, screen.height);
InBlock.gif        New_CW.document.all.include.style.width 
= screen.width;
ExpandedSubBlockEnd.gif    }

ExpandedSubBlockEnd.gif}

InBlock.gif
InBlock.gif
InBlock.gif
//-----------------------------------------
InBlock.gif

InBlock.gif
InBlock.gif
InBlock.gifwindow.onfocus  
= show_CW;
InBlock.gifwindow.onresize 
= show_CW;
InBlock.gif
InBlock.gif
// Move Window
InBlock.gif
var drag_x,drag_y,draging=false
InBlock.gif
ExpandedSubBlockStart.gif
function drag_move(e){
ExpandedSubBlockStart.gif    
if (draging){
InBlock.gif        New_CW.show(e.screenX
-drag_x, e.screenY-drag_y, CW_width, CW_height);
InBlock.gif        
return false;
ExpandedSubBlockEnd.gif    }

ExpandedSubBlockEnd.gif}

InBlock.gif
ExpandedSubBlockStart.gif
function drag_down(e){
InBlock.gif    
if(e.button==2)return;
InBlock.gif    
if(New_CW.document.body.offsetWidth==screen.width && New_CW.document.body.offsetHeight==screen.height)return;
InBlock.gif    drag_x
=e.clientX;
InBlock.gif    drag_y
=e.clientY;
InBlock.gif    draging
=true;
InBlock.gif    e.srcElement.setCapture();
ExpandedSubBlockEnd.gif}

InBlock.gif
ExpandedSubBlockStart.gif
function drag_up(e){
InBlock.gif    draging
=false;
InBlock.gif    e.srcElement.releaseCapture();
InBlock.gif    
if(New_CW.document.body.offsetWidth==screen.width && New_CW.document.body.offsetHeight==screen.height) return;
InBlock.gif    CW_top  
= e.screenX-drag_x;
InBlock.gif    CW_left 
= e.screenY-drag_y;
ExpandedSubBlockEnd.gif}

ExpandedBlockEnd.gif
None.gif
</ SCRIPT >
None.gif </ HTML >

default.htm可以是这样:
None.gif < html >
None.gif     < head >
None.gif         < title >LifeWithDVD </ title >
None.gif         < meta  http-equiv ="Content-Type"  content ="text/html; charset=GB2312" >
None.gif     < script  id =clientEventHandlersJS  language =javascript>
None.gif
<!--
None.gif
None.giffunction btn_onclick() {
None.gif//window.close();
None.gifalert(Text3.value+Text1.value);
None.gifreturn false;
None.gif}
None.gif
None.gif//--
>
None.gif
</ script >
None.gif </ head >
None.gif     < body >
None.gif         < Div >
None.gif            User Name < INPUT  id ="Text3"  type ="text"  name ="Text1" >< br >
None.gif            Password  < INPUT  id ="Text1"  type ="text"  name ="Text1" >< br >
None.gif             < p > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </ p >
None.gif             < input  id ="btn"  type ="button"  name ="btnsubmit"  value ="submit"  onclick ="return btn_onclick()" >
None.gif         </ Div >
None.gif     </ body >
None.gif </ html >
None.gif


本文转自斯克迪亚博客园博客,原文链接:http://www.cnblogs.com/sgsoft/archive/2004/10/13/51679.html,如需转载请自行联系原作者
相关文章
|
8月前
|
Windows
PADS在WIN10系统中菜单显示不全的解决方法
决定由AD转PADS,打开发现菜单显示不正常,如下图所示:
519 0
|
11月前
火狐浏览器设置默认缩放比例
火狐浏览器设置默认缩放比例
|
iOS开发
iPhone和ipad去掉按钮默认样式
1.手机端web开发,遇到一下问题: 按钮应该是红色的背景,结果上面有一层白色的蒙层。 去掉所有自定义样式发现:白色的蒙层是button自带的样式,在iPhone和ipad上面没有去掉
75 0
Windows cmd窗口改变字体或背景颜色
Windows cmd窗口改变字体或背景颜色
Windows cmd窗口改变字体或背景颜色
案例分享:Qt九宫格图片资源浏览器(支持window、linux、兼容各国产系统,支持子文件夹,多选,全选,图片预览,行数与列数设置等)
案例分享:Qt九宫格图片资源浏览器(支持window、linux、兼容各国产系统,支持子文件夹,多选,全选,图片预览,行数与列数设置等)
案例分享:Qt九宫格图片资源浏览器(支持window、linux、兼容各国产系统,支持子文件夹,多选,全选,图片预览,行数与列数设置等)
|
Web App开发 iOS开发
为 iPhone 和 iPad 自定义网站的主屏幕图标
iPhone 和 iPad 等苹果设备使用主屏幕 (Home Screen, 也称桌面) 管理应用程序, 还可以通过浏览器的添加到主屏幕功能将网站链接作为快捷方式添加为主屏幕图标. 是否你也想过为网站定义一个图标, 如果用户将网站添加至主屏幕, 网站链接看起来更像原生程序, 也能获得更多的关注.
1413 0
文本超出多行显示省略号 移动端禁止双击缩放
文本超出多行显示省略号 移动端禁止双击缩放
PyQt5 技术篇-设置窗口启用默认桌面位置,按屏幕比例
PyQt5 技术篇-设置窗口启用默认桌面位置,按屏幕比例
327 0
PyQt5 技术篇-设置窗口启用默认桌面位置,按屏幕比例