zoukankan      html  css  js  c++  java
  • js简易美丽的提示框

    <span style="font-size:14px;">function showTips(txt, time, status) {
    		var htmlCon = '';
    		if (txt != '') {
    			if (status != 0 && status != undefined) {
    				htmlCon = '<div class="tipsBox" style="220px;padding:10px;background-color:#4AAF33;border-radius:4px;-webkit-border-radius: 4px;-moz-border-radius: 4px;box-shadow:0 0 3px #ddd inset;-webkit-box-shadow: 0 0 3px #ddd inset;text-align:center;position:fixed;top:25%;left:50%;z-index:999999;margin-left:-120px;"><img src="images/ok.png" style="vertical-align: middle;margin-right:5px;" alt="OK,"/>' + txt + '</div>';
    			} else {
    				htmlCon = '<div class="tipsBox" style="220px;padding:10px;background-color:#F75058;border-radius:4px;-webkit-border-radius: 4px;-moz-border-radius: 4px;box-shadow:0 0 3px #ddd inset;-webkit-box-shadow: 0 0 3px #ddd inset;text-align:center;position:fixed;top:25%;left:50%;z-index:999999;margin-left:-120px;"><img src="images/err.png" style="vertical-align: middle;margin-right:5px;" alt="Error,"/>' + txt + '</div>';
    			}
    			$('body').prepend(htmlCon);
    			if (time == '' || time == undefined) {
    				time = 1500;
    			}
    			setTimeout(function() {
    				$('.tipsBox').remove();
    			}, time);
    		}
    <p>	}</span></p><p>/*</p><p>该方法可直接复制使用,
    參数:text 字符串 为所提示的信息文字
    time 整数 为自己主动消失的时间 单位为毫秒,如:1000
    status 整数 1和0 为1时为正确信息提示,背景绿色,图片标示为✔符号。为0时。背景红色,标示为✘红叉
    注:因为图片上传问题。大家能够自行寻找图片16*16</span>
    
    欢迎增加Java交流群:398918539</p><p>*/</p>
  • 相关阅读:
    构建maven项目3
    maven初试2
    maven入门
    Spring对Hibernate事务管理
    UNIX网络编程卷1 时间获取程序client UDP 协议无关
    keystone WSGI流程
    Request介绍及演示样例 PART1
    恭喜兄弟到360实习
    GNU Linux高并发性能优化方案
    QTP 无法识别web 大全
  • 原文地址:https://www.cnblogs.com/tlnshuju/p/7101866.html
Copyright © 2011-2022 走看看