`

jQuery 消息提示框

阅读更多
<script src="jquery-1.2.6.pack.js" type="text/javascript"></script>


<div id="aa" style="width:200px;height:300px;border:1px solid green;position:absolute;right:0px;bottom:0;display=none;">
   <input type=button onclick="$('#aa').slideUp(1000)" value="x"> <br>
   <input type=checkbox onclick="clearInterval(bb)" id="chk">下次不在提示
   <div>
   	 <a id="aaa" href="">您有x个未读消息</a>
   </div>
</div>

<script>
	  function showmsg()
	  {
	  	 //去查有几个未读消息
	  	 $.post("url",function(x){
	  	     	if (x>0)
	  	     	{
	  	     		  $("#aa").slideDown(1000);
	  	     		  $("#aaa").html("您有"+x+"个未读消息");
	  	     	}
	  	 });
	  }
	 
	  
	  function showmsg2()
	  {
	  	 //弹出消息(速度)
	  	 $("#aa").slideDown(1000);
	  }
	  
	  //每隔几秒调用
	  var bb = setInterval("showmsg2()",5000);
</script>

分享到:
评论
1 楼 liuweihug 2014-07-26  
jquery message tooltip告警提示信息展示控件 - 前端编程 - IT工作生活这点事。Just Such So!
http://www.suchso.com/UIweb/jquery-message-tooltip-warning-error-show.html

相关推荐

Global site tag (gtag.js) - Google Analytics