- 
                Notifications
    
You must be signed in to change notification settings  - Fork 20
 
LayUI
        kcp edited this page Jul 13, 2020 
        ·
        2 revisions
      
    目录 start
目录 end|2020-06-04 19:41|
写法稍微复杂了些,但是提高了页面加载速度
引入核心文件:
    <link rel="stylesheet" href="../layui/css/layui.css"/>
    <script src="../layui/layui.js"></script>使用layer模块:
    layui.use(['layer'], function(){
        var layer = layui.layer;
        layer.msg('Hello World');
    });弹出页面层
- 如何将script 标签内容直接引入
 
    layer.open({
      type: 1,
      area: ['600px', '360px'],
      shadeClose: true, //点击遮罩关闭
      content: 'test'
    });    <script type="text/html" id="test">
    <input type="text" />
    </script>弹出页面中异步提交表单
    <script type="text/html" id="set_key">
        <form id="set-form" class="set-form">
            <input type="text" id="key" required/> <->
            <input type="text" id="value" required/><br><br>
            <button>新增 string</button>
        </form>
    </script>
    <button onclick="string()">String</button>    function string(){
        var set_content = $("#set_key").html()
        layer.tab({
            area: ['500px', '520px'],
            tab: [{
                title: 'set', 
                content: set_content
            }]
        });        
        $("#set-form").submit(function(e){
            e.preventDefault();
            set();
        });
    }
    function set(){
        var key = $("#key").val()
        var value = $("#value").val()
        handlePost('/key',  {
            key: key, 
            value: value
        }, function(data){
            console.log(data)
        }, function(data){
            console.log(data)
        })
    }
}- 
【 Algorithm 】
 - 
【 Blog 】
 - 
【 C 】
 - 
【 Database 】
 - 
【 Distributed 】
 - 
【 FrontEnd 】
- 【 FrontEnd/Frame 】
 - 【 FrontEnd/Node 】
 - Font
 - Hexo
 - JavaScript
 - LearnPS
 - ResponseCode
 - SVG
 - ViewSolution
 - extjs学习笔记
 
 - 
【 Functional 】
 - 
【 Go 】
 - 
【 Groovy 】
 - 
【 Java 】
- 【 Java/AdvancedLearning 】
- 【 JavaBasic 】
 - 【 JavaCache 】
 - 【 JavaCollection 】
 - 【 JavaConcurrency 】
 - 【 JavaMap 】
 - Annotation
 - ClassFile
 - Collection
 - Concurrency
 - Deploy
 - Exception
 - ExtendsAndInterface
 - Generics
 - IO
 - JDBC
 - JDKAndJRE
 - JMX
 - JVM
 - Java11
 - Java7
 - Java8
 - JavaNetwork
 - JavaReleaseVersion
 - JavaWeb
 - JvmPerformance
 - MQ
 - MultipleLanguage
 - Proxy
 - Reflection
 - Serialize
 - SyntaxAndType
 - Thread
 - WebPerformance
 
 - 【 Java/Android 】
 - 【 Java/Ecosystem 】
 - 【 Java/MSA 】
 - 【 Java/Spring 】
 - 【 Java/TemplateEngine 】
 - 【 Java/Test 】
 - 【 Java/Tool 】
 - 【 Java/thread 】
 - AlibabaJavaStandard
 - DesignPattern
 - HashMap解析
 - Java-NIO
 - Java虚拟机
 - Log
 - MIS
 - Quartz
 - RESTful
 - WebSocket学习笔记
 - ZooKeeper学习笔记
 - android学习笔记
 
 - 【 Java/AdvancedLearning 】
 - 
【 Kotlin 】
 - 
【 Linux 】
- 【 Linux/Alpine 】
 - 【 Linux/Arch 】
 - 【 Linux/Base 】
 - 【 Linux/Centos 】
 - 【 Linux/Container 】
 - 【 Linux/Debian 】
 - 【 Linux/Tool 】
 - JavaDevInit
 - Linux系统学习
 
 - 
【 MyBlog 】
 - 
【 Python 】
- 【 Python/Tool 】
 - Python
 - PythonConcurrent
 - PythonGUI
 - PythonGame
 - PythonNet
 - PythonOffices
 - PythonWeb
 - Python基础
 - Python核心学习
 
 - 
【 Reactive 】
 - 
【 Rust 】
 - 
【 Scala 】
 - 
【 Script 】
 - 
【 Skills 】
- 【 Skills/Application 】
 - 【 Skills/CS 】
 - 【 Skills/Cache 】
 - 【 Skills/Councurrency 】
 - 【 Skills/DevOps 】
 - 【 Skills/Document 】
 - 【 Skills/Ecology 】
 - 【 Skills/Network 】
 - 【 Skills/Search 】
 - 【 Skills/SoftwareEngineering 】
 - 【 Skills/Spider 】
 - 【 Skills/Test 】
 - 【 Skills/Vcs 】
 - 【 Skills/Work 】
 - AppManual
 - CelebrityQuotes
 - Miscellaneous
 - Platform
 - Problem
 - Protobuf
 - RegularExpression
 - SoftwareDesignEngineer
 - Website
 
 - 
【 Windows 】