ajax无边框弹出框
来源:互联网 发布:手机制作电子书软件 编辑:程序博客网 时间:2024/06/05 16:45
<script type="text/javascript"> var Obj='' document.onmouseup=MUp document.onmousemove=MMove function MDown(Object) { Obj=Object.id document.all(Obj).setCapture() pX=event.x-document.all(Obj).style.pixelLeft; pY=event.y-document.all(Obj).style.pixelTop; } function MMove() { if(Obj!='') { document.all(Obj).style.left=event.x-pX; document.all(Obj).style.top=event.y-pY; } } function MUp() { if(Obj!='') { document.all(Obj).releaseCapture(); Obj=''; } } function openWithIframe(tit,url,w,h) { var sWidth,sHeight; sWidth=document.body.clientWidth; sHeight=document.body.scrollHeight; var bgObj=document.createElement("div"); bgObj.setAttribute('id','bgDiv'); bgObj.style.position="absolute"; bgObj.style.top="0"; bgObj.style.background="#000000"; bgObj.style.filter="Alpha(Opacity=30);"; bgObj.style.left="0"; bgObj.style.width=sWidth + "px"; bgObj.style.height=sHeight + "px"; bgObj.style.zIndex = "10000"; document.body.appendChild(bgObj); massage_box.style.left = (document.body.clientWidth - w) / 2; massage_box.style.top = (screen.height - h) / 2-80; massage_box.style.screenx = (document.body.clientWidth - w) / 2;//仅适用于Netscape massage_box.style.screeny = (screen.height - h) / 2-80;//仅适用于Netscape massage_box.style.width = w+"px"; massage_box.style.height = h+"px"; pop_title.innerHTML=tit; massage_box.style.display='' var popiframe='<iframe src="'+url+'" width="'+(w-11)+'px" height="'+(h-36)+'px" frameborder=0 scrolling=no></iframe>'; pop_iframe.innerHTML=popiframe; } function closeWithIframe() { massage_box.style.display="none"; document.body.removeChild(document.getElementById("bgDiv")); } document.write('<div id="massage_box" style="position:absolute; FILTER: progid:DXImageTransform.Microsoft.DropShadow();z-index:10001;display:none">'); document.write('<div style="border-width:1 1 3 1; width:100%; height:100%; background:#fff; color:#57A01B; font-size:12px; line-height:150%">'); document.write('<div onmousedown=MDown(massage_box) style="background:#57A01B; height:20px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px;color:#fff;cursor:move;padding:0 0 4px 0">'); document.write('<div style="display:inline; width:200px; position:absolute;padding:3px 0 0 5px" id=pop_title></div>'); document.write('<span onClick="closeWithIframe()" style="float:right; display:inline; cursor:hand;padding:3px 5px 0 0;font-size:12px">关闭</span>'); document.write('</div>'); document.write('<div style="padding:5px" id=pop_iframe></div>'); document.write('</div>'); document.write('</div>'); </script>
调用方法:
<a href=# onClick="openWithIframe('ajax提示框','www.programlife.cn',300,200);">ajax提示框</a>
- ajax无边框弹出框
- AJAX无边框提示
- ajax 无刷新弹出消息框
- javascript应用:实现复选框全选/全不选切换,创建无边框的弹出窗口!
- VB中无边框窗体实现弹出菜单
- 弹出无边框页面,(将页面以div的形式弹出)
- 做无边框的下拉列表框!
- 无弹出框的验证
- iframe无边框(隐藏边框)
- iframe去边框,无边框
- 设置UltraWebTab无边框
- 无边框窗口代码
- 无边框文本框
- iframe 无边框
- Button 无边框样式
- 拖放无边框窗体
- iframe无边框实现
- iframe无边框实现
- VC++ 的构造函数之间的调用居然不能保存成员变量的赋值。。
- [转]ACM竞赛之新人向导
- 隐形者软件代码交流博客
- Swing Panel Nest
- 【转】ACM竞赛要掌握的知识
- ajax无边框弹出框
- 【转】ACM/ICPC新人向导
- ACE线程管理机制-线程的创建与管理
- 减少看电视,挤出时间的方法!
- DIV蒙版/遮罩效果锁定窗口
- speech codec (G.711, G.723, G.726, G.729, iLBC)
- 将canvas里头的图画保存成为gif或jpg图象
- 使用Java提供的类生成XML例子
- 【转】推荐一些题目,希望对参与ICPC竞赛的同学有所帮助