百分求一例,在IE里面做出类似在win32环境里面应用程序父子窗口的效果 if you have IE5.5 up, take a look at http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/winless.htm 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 使用层就可以,再加上IFrame就更厉害了 /************************************************************************* 类*************************************************************************/function TMDI(name){ this.name=name; this.wins=new Array(); this.zindex=gui.winZ; this.offsetX=10; this.offsetY=40; this.refresh=MDI_refresh; this.fullView=MDI_fullView; this.createWin=MDI_createWin; this.makeStyle=MDI_makeStyle; this.makeCode=MDI_makeCode; this.getObj=MDI_getObj; }function TWin(owner,name,caption,content,type,x,y,w,h,moveable,resizeable){ this.name=name; this.owner=owner; this.type=type//'WIN';//'NormalWIN'||'ModelWIN'||'BrowerWIN'||'noneWIN' this.caption=caption||('Unnamed Window '+owner.wins.length); // this.content=content||'loading data,please wait...'; this.x=x||0; this.y=y||0; this.nmalX=this.x; this.nmalY=this.y; this.state='normal'; this.winindex=owner.wins.length; this.zindex=owner.zindex; this.page=1; this.pages=new Array(); this.pages[0]=content||'loading data,please wait...';//默认的页内容 this.dragable=(moveable==null)?true:moveable; this.resizeable=(resizeable==null)?true:resizeable; this.scrollspeed=10; this.resizale=true; //style... this.width=w||250; this.height=h||100; this.nmalW=this.width; this.nmalH=this.height; this.border=1; this.borderC='#000000'//'#000000'; this.headerH=20; this.headerC='#cccccc'; this.captionH=15; this.captionW=70; this.captionC='transparent'; this.buttonH=this.headerH-2*this.border; this.spliterH=5; this.spliterC='#ff9000'; this.footerH=15; this.footerC='#e1e1e1'; this.bodyH=this.height-5*this.border-this.headerH-this.spliterH-this.footerH; this.bodyC='#FFFFFF'; this.scrollspeed=5; this.delay=4 this.closesec=this.delay;//自动关闭 this.closetime=null; this.textX=8; this.textY=3; //top.... this.headerT=this.border; this.spliterT=this.headerT+this.headerH+this.border; this.bodyT=this.spliterT+this.spliterH+this.border; this.footerT=this.bodyT+this.bodyH+this.border; this.headerW=this.width-2*this.border; this.spliterW=this.width-2*this.border; this.bodyW=this.width-2*this.border; this.footerW=this.width-2*this.border; this.scrollT=this.border; this.scrollW=25;//Math.floor(54*this.buttonH/16); //method.... this.makeStyle=WIN_makeStyle; this.makeCode=WIN_makeCode; this.getObj=WIN_getObj; this.fullView=WIN_fullView; this.refresh=WIN_refresh; this.moveTo=WIN_moveTo; this.show=WIN_showIt; this.hide=WIN_hideIt; //this.close=WIN_hideIt; this.delayClose=WIN_delayColse; this.resizeTo=WIN_resizeTo; this.min=WIN_min; this.max=WIN_max; this.scrollUp=WIN_scrollUp; this.scrollDown=WIN_scrollDown; this.showPager=WIN_showPager; this.hidePager=WIN_hidePager; this.pageToL=WIN_pageToL; this.pageToR=WIN_pageToR; this.changePage=WIN_changePage; this.makePages=WIN_makePages; this.startAni=WIN_startAni; this.startAniZoom=WIN_startAniZoom; this.dragD=WIN_dragMDown; this.dragM=WIN_dragMMove; this.dragU=WIN_dragMUp; this.setActive=WIN_setActive; this.changeZ=WIN_changeZ; owner.wins[name]=this;}/****************************************************************** methods of TMDI ********************************************************************/function MDI_makeStyle(){ this.csscode=''; for(i=0;i<this.wins.length;i++){ this.wins[i].makeStyle(); this.csscode+=this.wins[i].csscode; }}function MDI_makeCode(){ this.htmlcode=''; for(i=0;i<this.wins.length;i++){ this.wins[i].makeCode(); this.htmlcode+=this.wins[i].htmlcode; }}function MDI_getObj(){ for(i=0;i<this.wins.length;i++){ this.wins[i].getObj(); }}function MDI_fullView(){ for(i=0;i<this.wins.length;i++){ this.wins[i].fullView(); }}function MDI_refresh(){ for(i=0;i<this.wins.length;i++){ this.wins[i].refresh(); }}function MDI_createWin(name,caption,content,type,x,y,w,h,moveable,resizeable){ this.wins[this.wins.length]=new TWin(this,name,caption,content,type,x,y,w,h,moveable,resizeable);} 不行太长了放不下,太长了,没办法,来个email,其实就是在层中方上一个IFrame,让后通过js改变IFrame元素的location,思路就是这样,让后给你的层加上一些装饰,什么拖动,标题,页脚之类,user1.7host.com/ccrock 我的email: [email protected],先谢了 已经发到[email protected],一共两个文件,可以创建四种类型的窗体,包括你要的能够当浏览器适用的字窗体,这是我正在做的个人主页的一部分,正在调试阶段,比不断添加功能,具有分页功能,如果要使用分野功能这样;win1.pages[0]='fdsafadfa'; win1.pages[1]='fasdfasda'; .... win1.makePages(); win1.changePage(n);//切换到你默认的那一页,事实上你可以有3中方法创建窗体,信中是一种,上面是一种,还有就是你可以随时添加你想要得窗体,随时都可以这样做mdi.createWin(...);但是下面的有些不同,mdi.wins['newwin'].makeStyle();mdi.wins['newwin'].makeCode();document.write(mdi.wins['newwin'].csscode+mdi.wins['newwin'].htmlcode)mdi.wins['newwin'].getObj();//||mdi.getObj();这是比较安全的办法,如果你把代码像这样添加:divTMP.innerHTML=mdi.wins['newwin'].csscode+mdi.wins['newwin'].htmlcode时用前一种方法比较快;祝你好运!等我把网张做好了会公布全部代码的,别急,user1.7host.com/ccrock有效果 真的感谢llrock(百乐宝) 这么的热心不过user1.7host.com/ccrock 怎么也上不去阿 这里很多人交了我很多东西,短短一个月就从js盲升入1年级了,我只是把知道的说出来,那时国外的空间,确实不好上,我没找到免费的空间支持asp 能不能也给我一份,我也想看看!谢谢[email protected] 有没有用过火狐的js引擎spidermonkey的,请教个问题 Javascript如何实现一个四舍五入的显示器? 打开页面即载入图片的语句写法 一个关于ajax频繁请求造成的IE性能问题 这是什么状况?用xtree做树形结构遇到的奇怪问题 javascript如何将html代码嵌入到一个table标签里 如何禁止页面中某些控件获得焦点? readonly问题 急,如何把FRAME里的横向滚动条干掉. 请帮忙:怎样用代码实现当选中或经过表格行时被选中或向下的效果(像按钮被按下的那种效果!) 急需帮助,关于框架的scroll????? 任务:怎样用js实现一个目录树?
类
*************************************************************************/
function TMDI(name){
this.name=name;
this.wins=new Array();
this.zindex=gui.winZ;
this.offsetX=10;
this.offsetY=40; this.refresh=MDI_refresh;
this.fullView=MDI_fullView;
this.createWin=MDI_createWin;
this.makeStyle=MDI_makeStyle;
this.makeCode=MDI_makeCode;
this.getObj=MDI_getObj;
}function TWin(owner,name,caption,content,type,x,y,w,h,moveable,resizeable){
this.name=name;
this.owner=owner;
this.type=type//'WIN';//'NormalWIN'||'ModelWIN'||'BrowerWIN'||'noneWIN'
this.caption=caption||('Unnamed Window '+owner.wins.length);
// this.content=content||'loading data,please wait...';
this.x=x||0;
this.y=y||0;
this.nmalX=this.x;
this.nmalY=this.y;
this.state='normal';
this.winindex=owner.wins.length;
this.zindex=owner.zindex;
this.page=1;
this.pages=new Array();
this.pages[0]=content||'loading data,please wait...';//默认的页内容
this.dragable=(moveable==null)?true:moveable;
this.resizeable=(resizeable==null)?true:resizeable;
this.scrollspeed=10;
this.resizale=true;
//style...
this.width=w||250;
this.height=h||100;
this.nmalW=this.width;
this.nmalH=this.height;
this.border=1;
this.borderC='#000000'//'#000000';
this.headerH=20;
this.headerC='#cccccc';
this.captionH=15;
this.captionW=70;
this.captionC='transparent';
this.buttonH=this.headerH-2*this.border;
this.spliterH=5;
this.spliterC='#ff9000';
this.footerH=15;
this.footerC='#e1e1e1';
this.bodyH=this.height-5*this.border-this.headerH-this.spliterH-this.footerH;
this.bodyC='#FFFFFF';
this.scrollspeed=5;
this.delay=4
this.closesec=this.delay;//自动关闭
this.closetime=null;
this.textX=8;
this.textY=3;
//top....
this.headerT=this.border;
this.spliterT=this.headerT+this.headerH+this.border;
this.bodyT=this.spliterT+this.spliterH+this.border;
this.footerT=this.bodyT+this.bodyH+this.border;
this.headerW=this.width-2*this.border;
this.spliterW=this.width-2*this.border;
this.bodyW=this.width-2*this.border;
this.footerW=this.width-2*this.border;
this.scrollT=this.border;
this.scrollW=25;//Math.floor(54*this.buttonH/16); //method....
this.makeStyle=WIN_makeStyle;
this.makeCode=WIN_makeCode;
this.getObj=WIN_getObj;
this.fullView=WIN_fullView;
this.refresh=WIN_refresh;
this.moveTo=WIN_moveTo;
this.show=WIN_showIt;
this.hide=WIN_hideIt;
//this.close=WIN_hideIt;
this.delayClose=WIN_delayColse;
this.resizeTo=WIN_resizeTo;
this.min=WIN_min;
this.max=WIN_max;
this.scrollUp=WIN_scrollUp;
this.scrollDown=WIN_scrollDown;
this.showPager=WIN_showPager;
this.hidePager=WIN_hidePager;
this.pageToL=WIN_pageToL;
this.pageToR=WIN_pageToR;
this.changePage=WIN_changePage;
this.makePages=WIN_makePages; this.startAni=WIN_startAni;
this.startAniZoom=WIN_startAniZoom;
this.dragD=WIN_dragMDown;
this.dragM=WIN_dragMMove;
this.dragU=WIN_dragMUp;
this.setActive=WIN_setActive;
this.changeZ=WIN_changeZ; owner.wins[name]=this;
}
/******************************************************************
methods of TMDI
********************************************************************/
function MDI_makeStyle(){
this.csscode='';
for(i=0;i<this.wins.length;i++){
this.wins[i].makeStyle();
this.csscode+=this.wins[i].csscode;
}
}
function MDI_makeCode(){
this.htmlcode='';
for(i=0;i<this.wins.length;i++){
this.wins[i].makeCode();
this.htmlcode+=this.wins[i].htmlcode;
}
}function MDI_getObj(){
for(i=0;i<this.wins.length;i++){
this.wins[i].getObj();
}
}function MDI_fullView(){
for(i=0;i<this.wins.length;i++){
this.wins[i].fullView();
}
}
function MDI_refresh(){
for(i=0;i<this.wins.length;i++){
this.wins[i].refresh();
}
}
function MDI_createWin(name,caption,content,type,x,y,w,h,moveable,resizeable){
this.wins[this.wins.length]=new TWin(this,name,caption,content,type,x,y,w,h,moveable,resizeable);
}
IFrame元素的location,思路就是这样,让后给你的层加上一些装饰,什么拖动,标题,页脚之类,user1.7host.com/ccrock
win1.pages[1]='fasdfasda';
....
win1.makePages();
win1.changePage(n);//切换到你默认的那一页,事实上你可以有3中方法创建窗体,信中是一种,上面是一种,还有就是你可以随时添加你想要得窗体,随时都可以这样做mdi.createWin(...);但是下面的有些不同,
mdi.wins['newwin'].makeStyle();
mdi.wins['newwin'].makeCode();
document.write(mdi.wins['newwin'].csscode+mdi.wins['newwin'].htmlcode)
mdi.wins['newwin'].getObj();//||mdi.getObj();这是比较安全的办法,如果你把代码像这样添加:divTMP.innerHTML=mdi.wins['newwin'].csscode+mdi.wins['newwin'].htmlcode时用前一种方法比较快;
祝你好运!等我把网张做好了会公布全部代码的,别急,user1.7host.com/ccrock有效果
不过user1.7host.com/ccrock 怎么也上不去阿
[email protected]