页面右下角提示信息框
来源:互联网 发布:数据方舟产品 编辑:程序博客网 时间:2024/06/04 19:56
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html> <head> <title>index.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/> <meta http-equiv="description" content="this is my page"/> <meta http-equiv="content-type" content="text/html; charset=GBK"/> <!--<link rel="stylesheet" type="text/css" href="./styles.css">--> </head> <body onload='initPage();'> </body> <script type="text/javascript"> function initPage(){ var returnMsg = "<p>信息1 jquery-1.7.2.min.js</p><p>信息2 notice.js</p>"; $.show('提示信息',returnMsg,10000); } </script> <script src="jquery.min.js" type="text/javascript" ></script> <script type="text/javascript" >var time;var delayTime;$(function(){ // 增加浮动DIV $('body').append("<div id='notice' onselectstart='return false'><span class='notice_title'> </span><span class='cbtn'>[关闭]</span><div class='notice_content'></div></div>"); // 更改样式 $('#notice').css({right:"0",bottom:"0",cursor:"default",position:"fixed","background-color":"#F0F9FD",color:"#1F336B","z-index":"999",border:"1px #F2F2FB solid",margin:"2px",padding:"10px","font-weight":"bold","line-height":"25px",display:"none",width:"400px",height:"200px"}); $('#notice .cbtn').css({color:"#FF0000",cursor:"pointer","padding-right":"5px",float:"right",position:"relative"}); $('#notice .notice_content').css({margin:"3px","font-weight":"normal",border:"1px #B9C9EF solid","line-height":"20px","margin-bottom":"10px",padding:"10px",height:"135px"}); /* 绑定事件*/ $('#notice').hover( function(){ $(this).stop(true,true).slideDown(); clearTimeout(time); }, function(){ time = setTimeout('_notice()',delayTime); } ); //绑定关闭事件 $('.cbtn').bind('click',function(){ $('#notice').slideUp('fast'); clearTimeout(time); });});$.extend({ lay:function(_width,_height){ $('#notice').css({width:_width,height:_height}); }, show:function(_title,_msg,_time){ delayTime = _time; $('.notice_title').html(_title); $('.notice_content').html(_msg); $('#notice').slideDown(2000); time = setTimeout('_notice()',delayTime); }});function _notice(){ $('#notice').slideUp(2000);} </script></html>
直接复制,修改下jquery.min.js的路径,就可以看到效果!!!
原文来自:http://www.oschina.net/code/snippet_587568_49870
0 0
- 页面右下角提示信息框
- qq右下角信息提示框的实现
- js插件-右下角弹出信息提示框
- 页面右下角出现提示框 js版
- 页面右下角弹出提示框 js版
- 页面右下角弹出提示框 js版
- EasyUI实现页面右下角弹出提示框
- 页面右下角弹出提示
- 页面内右下角弹出提示
- javascript实现屏幕右下角弹出信息提示框
- asp.net 右下角弹出新提醒信息提示框
- 纯js实现页面右下角提示信息渐出和渐失
- 实现右下角提示框
- 右下角提示框
- 仿msn,右下角信息提示页
- 类似msn的右下角信息提示
- 右下角信息提示脚本&多级联动Select
- 页面右下角弹出的消息提示代码
- 网络传输层的工作原理
- 设计模式之工厂方法模式(C++实现)
- @PostConstruct 和 @PreDestroy
- Java多态中成员的特点
- Nginx入门
- 页面右下角提示信息框
- CSS1
- Javascript判断页面刷新或关闭的方法
- 快速排序、求旋转数组最小数字
- (4.1.20)android的样式(style)与主题(theme)
- UIScrollView基本用法和代理方法
- Clist循环链表的实现
- Android 快速开发框架:推荐10个框架:afinal、ThinkAndroid、andBase、KJFrameForAndroid、SmartAndroid、dhroid..
- 在windows上让Widefly或Jboss的log带上颜色