SOURCE

console 命令行工具 X clear

                    
>
console
function showLoginDialog(e) {
    var x = 10; //tooltip偏移鼠标的横坐标
    var y = 20; //tooptip偏移鼠标的纵坐标
    if ($(".loginBox").length === 0) {
        var loginBox = $(document.createElement("div"));
        loginBox.addClass("loginBox");
        loginBox.html('<label for="Dialog" style="display: inline-block;width: 100%"></label>' +
            '<div style="width: 100%;height:80%;border:solid 1px #7e7e80;">' +
            '</div>' +
            '<input type="text" style="width: 49%;height: 30px;text-align: center;" class="btn" value="确定">' +
            '<input type="text" style="width: 50;height: 30px;text-align: center;" class="btn-close" value="取消">');
        loginBox.appendTo($(document.body));
        $(".btn").click(function () {
            $($(".k-optional2").parents("li").closest("li")).each(function () {

            });
            $(".loginBox").hide();
        });
        $(".btn-close").click(function () {
            $(".loginBox").hide();
        });
    }
    if ($(".loginBox").css("display") === "none") {
        $(".loginBox").show();
    }
}
<script src="https://cdn.bootcss.com/jquery/2.2.3/jquery.js"></script>
<button onclick="showLoginDialog(this)">对话框
</button>
.loginBox {
    position: absolute;
    left: 15%;
    top: 10%;
    background-color: #1b95a4;
    padding: 20px;
    border: 1px solid #c6c6c6;
    box-shadow: rgba(0, 0, 0, 0.4) 1px 2px 5px;
    z-index: 2000;
    height: 300px;
    width: 350px;
    background:white;
    line-height:32px;
    word-wrap: break-word;
    word-break: normal;
    display:none;
}