zoukankan      html  css  js  c++  java
  • 通过js写一个消息弹框

    prompt(data,time) {
            let alertForm = document.createElement('div');
            alertForm.id="promptBox";
            alertForm.style.position = "fixed";
            alertForm.style.right = "4%";
            alertForm.style.top = "6%";
            alertForm.style.margin = "0 auto";
            alertForm.style.width = "300px";
            alertForm.style.height = "50px";
            alertForm.style.background = "#00bb9c";
            alertForm.style.textAlign = "center";
            alertForm.style.borderRadius = "5px";
            alertForm.style.border = "1px solid #ccc";
            alertForm.style.padding= '14px 22px';
            alertForm.style.fontSize= '14px';
            alertForm.style.fontFamily= "微软雅黑";
            alertForm.style.fontWeight= 'normal';
            alertForm.style.color= '#fff';
            alertForm.style.opacity= '.8';
            alertForm.style.zIndex = "10001";
            alertForm.innerHTML = data;
            document.getElementsByTagName("body")[0].appendChild(alertForm);
            setTimeout(function(){
                alertForm.style.display = "none";
            },time)
        }
  • 相关阅读:
    redis的其他命令
    redis的有序集合ZSET(stored set)
    redis 的set数据类型
    redis 的hash数据类型
    php命令
    intellij idea
    生产者消费者问题
    JAVA sleep和wait 异同
    JAVA线程通信
    java线程同步--lock锁(JDK 5 新增)
  • 原文地址:https://www.cnblogs.com/baiyygynui/p/5836461.html
Copyright © 2011-2022 走看看