怎么样才能做一个置顶的层? dialog窗口showModalDialog("1.htm") 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我要这种形式的<div></div>showModalDialog这个太慢了 /*** 作用:初始化背景层 */alternateWindow.prototype.initBg=function(){with(this.pBg.style){position="absolute";left="0";top="0";width="100%";height="100%";visibility="hidden";backgroundColor="#333333";filter="blendTrans(duration=1) alpha(opacity=30)";}this.pBg.filters.blendTrans.apply();this.pBg.style.visibility="visible";this.pBg.filters.blendTrans.play();}/** * 作用:初始化显示层 */alternateWindow.prototype.initAlertBody=function(obj,info){with(obj.style){position="absolute";width="400";height="150";backgroundColor="#ffffff";}obj.style.left=window.document.body.clientWidth/2-200;obj.style.top=window.document.body.clientHeight/3;var str;str ="<table border=0 cellpadding=0 cellspacing=1 bgcolor=#000000 width=100% height=100%><tr height=30>";str+="<td align=left style='color:#000000;font-size:14px;font-weight:bold' bgcolor=#9999ff>[提示]</td></tr>";str+="<tr><td align=center bgcolor=#efefff style='font-size:12px;color:#000000;vertical-align: middle;'>";str+=info+"</td></tr><tr height=30 bgcolor=#efefef><td align=center>" + "<input type='button' value='确定' id='OK'" + " onkeydown='parent.alternateWin.onKeyDown(event,this)'"+ " onclick='parent.alternateWin.closeWin()' style='border:solid 1px #666666;background:#cccccc'>" + "</td></tr></table>";obj.innerHTML=str;this.win.document.body.all.OK.focus();this.FocusWhere="OK";}alternateWindow.prototype.onKeyDown=function(event,obj){ switch(event.keyCode){ case 9: event.keyCode=-1; if(this.type=="confirm"){ if(this.FocusWhere=="OK"){ this.win.document.body.all.NO.focus(); this.FocusWhere="NO"; }else{ this.win.document.body.all.OK.focus(); this.FocusWhere="OK"; } } break; case 13:obj.click();;break; case 27:this.closeWin();break; } }/** * 作用:初始化显示层 conFirm提示层 */alternateWindow.prototype.initConfirmBody=function(obj,info,ok_func,notok_func,ok_str,notok_str){with(obj.style){position="absolute";width="400";height="150";backgroundColor="#ffffff";}if(ok_str==null){ok_str="确定";}if(notok_str==null){notok_str="取消"}obj.style.left=window.document.body.clientWidth/2-200;obj.style.top=window.document.body.clientHeight/3;var str;str="<table border=0 cellpadding=0 cellspacing=1 bgcolor=#000000 width=100% height=100%><tr height=30>";str+="<td align=left style='color:#000000;font-size:14px;font-weight:bold' bgcolor=#9999ff>[询问]</td></tr>";str+="<tr><td align=center bgcolor=#efefff style='font-size:12px;color:#000000;vertical-align: middle;'>";str+=info+"</td></tr><tr height=30 bgcolor=#efefef><td align=center>" +"<input type='button' id='OK'" +" onkeydown='parent.alternateWin.onKeyDown(event,this)'"+" onclick='parent.alternateWin.closeWin();parent."+ok_func+"();' " +" value='"+ok_str+"' style='border:solid 1px #666666;background:#cccccc'>"+" <input type='button' value='"+notok_str+"' id='NO'"+" onkeydown='parent.alternateWin.onKeyDown(event,this)'"+" onclick='parent.alternateWin.closeWin();" +" parent."+notok_func+"();' style='border:solid 1px #666666;background:#cccccc'></td></tr></table>";obj.innerHTML=str;this.win.document.body.all.OK.focus();}/** * 作用:关闭一切 */alternateWindow.prototype.closeWin=function(){alternateFrame.style.visibility="hidden"; this.showAllSelect();document.body.style.overflow="auto"; }/** * 作用:隐藏所有的select */alternateWindow.prototype.hideAllSelect=function(){ var obj; obj=document.getElementsByTagName("SELECT"); var i; for(i=0;i<obj.length;i++)obj[i].style.visibility="hidden"; }/** * 显示所有的select */ alternateWindow.prototype.showAllSelect=function(){ var obj; obj=document.getElementsByTagName("SELECT"); var i; for(i=0;i<obj.length;i++)obj[i].style.visibility="visible";}</script><!----------------------------------------------------------------><script>function clk_yes(){alert("你也同意了我的观点");}function clk_no(){alert("不是你眼花了就是我眼花了!");}</script> js动态添加文本框 压缩的jS代码如何还原? 如何根据URL定位选项卡到指定的卡片项? 给出一段源码,请帮忙解决个问题! 如何下载.wmv视频? JS的弹出窗口返回值问题 请教js中的日期大小判断问题! 在全屏打开的窗口(a)中在打开一个窗口(b)后,当再次操作(a)时(b)将隐藏在后面 JAVASCRIPT取数据的问题 STRUTS2+HIBERNATE 初学出错。。。 firefox里面document.form1.upid.innerHTML=赋值后没反应?alert()这个却可以输出值,怎么办? 文本框的植是javascript写进去的 怎么在不碰他的情况去触发他的时间 什么事件都行
<div>
</div>
showModalDialog这个太慢了
* 作用:初始化背景层
*/
alternateWindow.prototype.initBg=function(){
with(this.pBg.style){
position="absolute";
left="0";
top="0";
width="100%";
height="100%";
visibility="hidden";
backgroundColor="#333333";
filter="blendTrans(duration=1) alpha(opacity=30)";
}
this.pBg.filters.blendTrans.apply();
this.pBg.style.visibility="visible";
this.pBg.filters.blendTrans.play();
}
/**
* 作用:初始化显示层
*/
alternateWindow.prototype.initAlertBody=function(obj,info){
with(obj.style){
position="absolute";
width="400";
height="150";
backgroundColor="#ffffff";
}
obj.style.left=window.document.body.clientWidth/2-200;
obj.style.top=window.document.body.clientHeight/3;
var str;
str ="<table border=0 cellpadding=0 cellspacing=1 bgcolor=#000000 width=100% height=100%><tr height=30>";
str+="<td align=left style='color:#000000;font-size:14px;font-weight:bold' bgcolor=#9999ff>[提示]</td></tr>";
str+="<tr><td align=center bgcolor=#efefff style='font-size:12px;color:#000000;vertical-align: middle;'>";
str+=info+"</td></tr><tr height=30 bgcolor=#efefef><td align=center>" +
"<input type='button' value='确定' id='OK'" +
" onkeydown='parent.alternateWin.onKeyDown(event,this)'"+
" onclick='parent.alternateWin.closeWin()' style='border:solid 1px #666666;background:#cccccc'>" +
"</td></tr></table>";
obj.innerHTML=str;
this.win.document.body.all.OK.focus();
this.FocusWhere="OK";
}alternateWindow.prototype.onKeyDown=function(event,obj){
switch(event.keyCode){
case 9:
event.keyCode=-1;
if(this.type=="confirm"){
if(this.FocusWhere=="OK"){
this.win.document.body.all.NO.focus();
this.FocusWhere="NO";
}else{
this.win.document.body.all.OK.focus();
this.FocusWhere="OK";
}
}
break;
case 13:obj.click();;break;
case 27:this.closeWin();break;
} }
/**
* 作用:初始化显示层 conFirm提示层
*/
alternateWindow.prototype.initConfirmBody=function(obj,info,ok_func,notok_func,ok_str,notok_str){
with(obj.style){
position="absolute";
width="400";
height="150";
backgroundColor="#ffffff";
}
if(ok_str==null){
ok_str="确定";
}
if(notok_str==null){
notok_str="取消"
}
obj.style.left=window.document.body.clientWidth/2-200;
obj.style.top=window.document.body.clientHeight/3;
var str;
str="<table border=0 cellpadding=0 cellspacing=1 bgcolor=#000000 width=100% height=100%><tr height=30>";
str+="<td align=left style='color:#000000;font-size:14px;font-weight:bold' bgcolor=#9999ff>[询问]</td></tr>";
str+="<tr><td align=center bgcolor=#efefff style='font-size:12px;color:#000000;vertical-align: middle;'>";
str+=info+"</td></tr><tr height=30 bgcolor=#efefef><td align=center>" +
"<input type='button' id='OK'" +
" onkeydown='parent.alternateWin.onKeyDown(event,this)'"+
" onclick='parent.alternateWin.closeWin();parent."+ok_func+"();' " +
" value='"+ok_str+"' style='border:solid 1px #666666;background:#cccccc'>"+
" <input type='button' value='"+notok_str+"' id='NO'"+
" onkeydown='parent.alternateWin.onKeyDown(event,this)'"+
" onclick='parent.alternateWin.closeWin();" +
" parent."+notok_func+"();' style='border:solid 1px #666666;background:#cccccc'></td></tr></table>";
obj.innerHTML=str;
this.win.document.body.all.OK.focus();
}/**
* 作用:关闭一切
*/
alternateWindow.prototype.closeWin=function(){
alternateFrame.style.visibility="hidden";
this.showAllSelect();
document.body.style.overflow="auto";
}
/**
* 作用:隐藏所有的select
*/
alternateWindow.prototype.hideAllSelect=function(){
var obj;
obj=document.getElementsByTagName("SELECT");
var i;
for(i=0;i<obj.length;i++)
obj[i].style.visibility="hidden";
}
/**
* 显示所有的select
*/
alternateWindow.prototype.showAllSelect=function(){
var obj;
obj=document.getElementsByTagName("SELECT");
var i;
for(i=0;i<obj.length;i++)
obj[i].style.visibility="visible";
}
</script><!---------------------------------------------------------------->
<script>
function clk_yes(){
alert("你也同意了我的观点");
}
function clk_no(){
alert("不是你眼花了就是我眼花了!");
}
</script>