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)
        }
  • 相关阅读:
    Java I/O流
    Java 网络编程
    Java 位运算
    Java高级特性 实用类
    Java高级特性 集合
    Log4j
    DML和DQL以及常用函数
    mysql 初始语句
    jQuery中表单的初始验证
    使用jQuery对DOM中的节点操作
  • 原文地址:https://www.cnblogs.com/baiyygynui/p/5836461.html
Copyright © 2011-2022 走看看