Ajax弹出漂亮可拖动的提示层(窗)效果
2009-09-01 08:29
267 查看
Ajax操作提示效果,实际上这里的AJAX仍然是JavaScript,只不过实现的效果和AJAX很相似,因此索性就这样叫了。这个提示窗不但界面漂亮,而且还支持鼠标拖动,代码也非常精简.
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>Ajax提示框</title> <mce:style type="text/css"><!-- a{ color:#000; font-size:12px;text-decoration:none} a:hover{ color:#900; text-decoration:underline} body{background:;filter:progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#ffffff,endColorStr=#003366); overflow:hidden} #massage_box{ position:absolute; left:expression((body.clientWidth-350)/2); top:expression((body.clientHeight-200)/2); width:350px; height:200px;filter:dropshadow(color=#666666,offx=3,offy=3,positive=2); z-index:2; visibility:hidden} #mask{ position:absolute; top:0; left:0; width:expression(body.scrollWidth);/*http://codefans.net*/ height:expression(body.scrollHeight); background:#666; filter:ALPHA(opacity=60); z-index:1; visibility:hidden} .massage{border:#036 solid; border-width:1 1 3 1; width:95%; height:95%; background:#fff; color:#036; font-size:12px; line-height:150%} /* www.codefans.net */ .header{background:#036; height:10%; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; padding:3 5 0 5; color:#fff} --></mce:style><style type="text/css" mce_bogus="1">a{ color:#000; font-size:12px;text-decoration:none} a:hover{ color:#900; text-decoration:underline} body{background:;filter:progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#ffffff,endColorStr=#003366); overflow:hidden} #massage_box{ position:absolute; left:expression((body.clientWidth-350)/2); top:expression((body.clientHeight-200)/2); width:350px; height:200px;filter:dropshadow(color=#666666,offx=3,offy=3,positive=2); z-index:2; visibility:hidden} #mask{ position:absolute; top:0; left:0; width:expression(body.scrollWidth);/*http://codefans.net*/ height:expression(body.scrollHeight); background:#666; filter:ALPHA(opacity=60); z-index:1; visibility:hidden} .massage{border:#036 solid; border-width:1 1 3 1; width:95%; height:95%; background:#fff; color:#036; font-size:12px; line-height:150%} /* www.codefans.net */ .header{background:#036; height:10%; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; padding:3 5 0 5; color:#fff}</style> <!--实现层移动--> <mce:script language="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=''; } } // --></mce:script> </head><body> <div id="massage_box"><div class="massage"> <div class="header" onmousedown=MDown(massage_box)><div style="display:inline; width:150px; position:absolute">源码爱好者友情提示:</div> <span onClick="massage_box.style.visibility='hidden'; mask.style.visibility='hidden'" style="float:right; display:inline; cursor:hand" mce_style="float:right; display:inline; cursor:hand">×</span></div> <ul style="margin-right:25" mce_style="margin-right:25"><li> <a href="http://www.codefans.net/" mce_href="http://www.codefans.net/">本站所有内容如要引用或转载请注明出处</a>,谢谢配合。 </li><li>欢迎大家来到源码爱好者,我们提供高质量学习型源代码、电子书、常用工具软件等。</li></ul></div></div> <div id="mask"></div> <span onClick="mask.style.visibility='visible';massage_box.style.visibility='visible'" style="cursor:hand" mce_style="cursor:hand"><a href="#" mce_href="#">点此提示</a></span> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> </body> </html>
相关文章推荐
- Ajax弹出漂亮可拖动的提示层(窗)效果
- Ajax弹出漂亮可拖动的提示层(窗)效果
- 可拖动的弹出层提示效果
- 一个不错的可拖动层遮罩加ALPHA滤镜(点击弹出后背景变浅色,信息提示框效果)
- 可拖动的弹出层提示效果
- 让AJAX弹出提示信息效果的代码
- 一个不错的可拖动层遮罩加ALPHA滤镜(点击弹出后背景变浅色,信息提示框效果)
- 漂亮的jquery提示效果(仿腾讯弹出层)
- 一个不错的可拖动层遮罩加ALPHA滤镜(点击弹出后背景变浅色,信息提示框效果)
- 可拖动的弹出层提示效果
- AJAX 弹出提示信息框效果
- 一个不错的可拖动层遮罩加ALPHA滤镜(点击弹出后背景变浅色,信息提示框效果)
- AJAX弹出提示信息效果
- AJAX弹出提示信息效果
- 漂亮的jquery提示效果(仿腾讯弹出层)
- JS组件Bootstrap实现弹出框和提示框效果代码
- Jquery qTip2实现多种提示效果,支持ajax,以及多种样式
- asp.net 2.0 ajax中实现弹出窗口报警提示
- js定时读取消息,并弹出动画效果的提示信息
- asp.net使用ajax后如何在客户端弹出提示对话框