欢迎光临
我们一直在努力

没有边框的窗口-ASP教程,客户端相关

建站超值云服务器,限时71元/月

<html xmlns:ie>

<meta http-equiv="content-type" content="text/html; charset=gb2312">

<ie:download id="include" style="behavior:url(#default#download)" />

<title>chromeless window</title>

<script language="jscript">

/*— special thanks for andot —*/

/*

this following code are designed and writen by windy_sk <seasonx@163.net>

you can use it freely, but u must held all the copyright items!

*/

/*— thanks for andot again —*/

var cw_width = 400;

var cw_height = 300;

var cw_top = 100;

var cw_left = 100;

var cw_url = "http://www.cnbruce.com/bluebook/";

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>chromeless window for ie6 sp1</td>";

temp += "<td style=color:#ffffff;padding-right:5px; align=right>";

temp += "<span id=help onclick=\"alert(chromeless window for ie6 sp1 – ver 1.0\\n\\ncode by windy_sk\\n\\nspecial thanks for andot)\" 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></table>";

cw_body.innerhtml = temp;

}

settimeout("insert_content()",1000);

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>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 没有边框的窗口-ASP教程,客户端相关
分享到: 更多 (0)