AJAX无边框提示

<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>

相关文章

IE6是一个非常老旧的网页浏览器,虽然现在很少人再使用它,但...
PHP中的count()函数是用来计算数组或容器中元素的个数。这个...
使用 AJAX(Asynchronous JavaScript and XML)技术可以在不...
Ajax(Asynchronous JavaScript and XML)是一种用于改进网页...
本文将介绍如何通过AJAX下载Excel文件流。通过AJAX,我们可以...
Ajax是一种用于客户端和服务器之间的异步通信技术。通过Ajax...