发一个无边窗口给大家!

叶子哟 2004-04-13 09:32:17
<HTML XMLNS:IE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<IE:Download ID="include" STYLE="behavior:url(#default#download)" />
<title>人工座席服务</title>

<SCRIPT LANGUAGE="JScript">

var CW_width = 800;
var CW_height = 600;
var CW_top = 150;
var CW_left = 150;
var CW_url = "/";
var New_CW = window.createPopup();
var CW_Body = New_CW.document.body;
var content = "";
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;";

//Build Window
include.startDownload(CW_url, function(source){content=source});

function insert_content(){
var temp = "";
CW_Body.style.overflow = "hidden";
CW_Body.style.backgroundColor = "white";
CW_Body.style.border = "solid black 1px";
content = content.replace(/<a ([^>]*)>/g,"<a onclick='parent.open(this.href);return false' $1>");
temp += "<table width=100% height=100% cellpadding=0 cellspacing=0 border=0>";
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'>";
temp += "<td style='color:#ffffff;padding-left:5px'>人工座席来电显示系统 Ver 1.0 版权所有</td>";
temp += "<td style='color:#ffffff;padding-right:5px;' align=right>";
temp += "<span id=Help onclick=\"alert('人工座席来电显示系统 - Ver 1.0\\n\\npublic for you\\n\\n1999-2004 版权所有')\" style=\""+CSStext+"font-family:System;padding-right:2px;\">?</span>";
temp += "<span id=Min onclick='parent.New_CW.hide();parent.blur()' style=\""+CSStext+"font-family:Webdings;\" title='Minimum'>0</span>";
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>";
temp += "<span id=Close onclick='parent.opener=null;parent.close()' style=\""+CSStext+"font-family:System;padding-right:2px;\" title='Close'>x</span>";
temp += "</td></tr><tr><td colspan=2>";
temp += "<div id=include style='overflow:scroll;overflow-x:hidden;overflow-y:auto; HEIGHT: 100%; width:"+CW_width+"'>";
temp += content;
temp += "你好呀!</div>";
temp += "</td></tr>";
temp +="</table>";
CW_Body.innerHTML = temp;
}

//setTimeout("insert_content()",1000);
insert_content()
var if_max = true;
function show_CW(){
window.moveTo(10000, 10000);
if(if_max){
New_CW.show(CW_top, CW_left, CW_width, CW_height);
if(typeof(New_CW.document.all.include)!="undefined"){
New_CW.document.all.include.style.width = CW_width;
New_CW.document.all.Max.innerText = "1";
}

}else{
New_CW.show(0, 0, screen.width, screen.height);
New_CW.document.all.include.style.width = screen.width;
}
}

window.onfocus = show_CW;
window.onresize = show_CW;

// Move Window
var drag_x,drag_y,draging=false

function drag_move(e){
if (draging){
New_CW.show(e.screenX-drag_x, e.screenY-drag_y, CW_width, CW_height);
return false;
}
}

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

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

</SCRIPT>
</HTML>
...全文
85 23 打赏 收藏 转发到动态 举报
写回复
用AI写文章
23 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhlym 2004-04-15
  • 打赏
  • 举报
回复
TO qihboy(柠檬园主)

如果一开始加载一个页应怎加?且这个页有菜单,点击菜单的链接后,如何在这个窗口里显示呢?
现贴出代码,3Q,因为这个窗口我之前见过就是这懂我上说的怎做
xuanhu 2004-04-15
  • 打赏
  • 举报
回复
非常感谢楼主,很有意思COPY下了
bolm 2004-04-15
  • 打赏
  • 举报
回复
非常好,谢了
hjwzr 2004-04-14
  • 打赏
  • 举报
回复
up
潜水的鱼 2004-04-13
  • 打赏
  • 举报
回复
看上去感觉效果并不太好,像一个平面图,

但代码值得学习!
Newrocky 2004-04-13
  • 打赏
  • 举报
回复
有趣!学习一下,这是什么原理啊?!

我看不懂你的代码啊~!!!

XML???
其实觉得似乎就是一般的JS啊
不过很漂亮!
银狐被占用 2004-04-13
  • 打赏
  • 举报
回复
好东东。

藏之~!
vjlin 2004-04-13
  • 打赏
  • 举报
回复
不错~
tlane 2004-04-13
  • 打赏
  • 举报
回复
好的
dicklee1214 2004-04-13
  • 打赏
  • 举报
回复
看看
Pandaxm 2004-04-13
  • 打赏
  • 举报
回复
偶来look
xxrl 2004-04-13
  • 打赏
  • 举报
回复
:)
lycey 2004-04-13
  • 打赏
  • 举报
回复
所有版本的IE都能用吗?还有为什么显示的时候在底部啊
yellowpaper 2004-04-13
  • 打赏
  • 举报
回复
非常好,谢了
qihboy 2004-04-13
  • 打赏
  • 举报
回复

<HTML XMLNS:IE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<IE:Download ID="include" STYLE="behavior:url(#default#download)" />
<title>人工座席服务</title>

<SCRIPT LANGUAGE="JScript">

var CW_width = 800; //这里设置窗口宽度
var CW_height = 600; //这里设置窗口高度
var CW_top = 150; //这里设置窗口离显示器顶部多少,那位说窗口总是在低下的,把
//这个改小点就行了
var CW_left = 150; //离显示器左边距离
var CW_url = "/";
var New_CW = window.createPopup();
var CW_Body = New_CW.document.body;
var content = "";
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;";
//上而样式啦....
//Build Window
include.startDownload(CW_url, function(source){content=source});

function insert_content(){
var temp = "";
CW_Body.style.overflow = "hidden";
CW_Body.style.backgroundColor = "white"; //改背景色,可以改为背景,如何你会CSS
CW_Body.style.border = "solid black 1px"; //边框样式
content = content.replace(/<a ([^>]*)>/g,"<a onclick='parent.open(this.href);return false' $1>");
temp += "<table width=100% height=100% cellpadding=0 cellspacing=0 border=0>";
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'>";
temp += "<td style='color:#ffffff;padding-left:5px'>人工座席来电显示系统 Ver 1.0 版权所有</td>"; //这里是TITLEBAR
temp += "<td style='color:#ffffff;padding-right:5px;' align=right>";
temp += "<span id=Help onclick=\"alert('人工座席来电显示系统 - Ver 1.0\\n\\npublic for you\\n\\n1999-2004 版权所有')\" style=\""+CSStext+"font-family:System;padding-right:2px;\">?</span>"; // 这儿是版权,就是那个?号点一下
//出来的.
temp += "<span id=Min onclick='parent.New_CW.hide();parent.blur()' style=\""+CSStext+"font-family:Webdings;\" title='Minimum'>0</span>";
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>";
temp += "<span id=Close onclick='parent.opener=null;parent.close()' style=\""+CSStext+"font-family:System;padding-right:2px;\" title='Close'>x</span>";
temp += "</td></tr><tr><td colspan=2>";
temp += "<div id=include style='overflow:scroll;overflow-x:hidden;overflow-y:auto; HEIGHT: 100%; width:"+CW_width+"'>";
temp += content;
temp += "你好呀!</div>"; //主页面内容,如果把这个页做成ASP的,那显示的内容就丰富啦
temp += "</td></tr>";
temp +="</table>";
CW_Body.innerHTML = temp;
}

//setTimeout("insert_content()",1000);
insert_content()
var if_max = true;
function show_CW(){
window.moveTo(10000, 10000);
if(if_max){
New_CW.show(CW_top, CW_left, CW_width, CW_height);
if(typeof(New_CW.document.all.include)!="undefined"){
New_CW.document.all.include.style.width = CW_width;
New_CW.document.all.Max.innerText = "1";
}

}else{
New_CW.show(0, 0, screen.width, screen.height);
New_CW.document.all.include.style.width = screen.width;
}
}

window.onfocus = show_CW;
window.onresize = show_CW;

// Move Window
var drag_x,drag_y,draging=false

function drag_move(e){
if (draging){
New_CW.show(e.screenX-drag_x, e.screenY-drag_y, CW_width, CW_height);
return false;
}
}

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

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

</SCRIPT>
</HTML>


好了,上面我都标注了,哪位想用就可以直接改了用了.呵....
qihboy 2004-04-13
  • 打赏
  • 举报
回复
不错哦...不知道在低版本的浏览器中能不能用.
我以前用的一个无边窗口,比这个还酷多了.但自从IE6有了SP1以来,就再也没办法用了.郁闷啊..
其实这些无边窗口的代码都很好看懂的.改参数也很好改.
ireance 2004-04-13
  • 打赏
  • 举报
回复
怎么看啊???
这段代码放哪啊??
shy
threezxw 2004-04-13
  • 打赏
  • 举报
回复
收藏
unknowbody 2004-04-13
  • 打赏
  • 举报
回复
太好了,谢谢
dayanmao 2004-04-13
  • 打赏
  • 举报
回复
好东西啊,收藏
加载更多回复(3)

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧