• 对象属性定义方法


    <!DOCTYPE html>
    <html lang="zh">
    
        <head>
            <meta charset="UTF-8" />
            <meta name="viewport" content="width=device-width, initial-scale=1.0" />
            <meta http-equiv="X-UA-Compatible" content="ie=edge" />
            <title>对象属性定义方法</title>
        </head>
    
        <body>
            <ul>
                <li id="first">1</li>
                <li>2</li>
                <li>3</li>
            </ul>
            <script type="text/javascript">
                var type = {
                    THEME_UPDATE: 'theme/update',
                    VIS_THEME_UPDATE: 'vis/theme/update'
                }
                var ss = {
                    [type.THEME_UPDATE](state) {
                        console.log(state)
                    }
                }
                console.log(ss)
                //function
                console.log(typeof ss[type.THEME_UPDATE])
            </script>
        </body>
    
    </html>

  • 相关阅读:
    安卓系统
    移动互联网产品设计的原则
    Java 笔记10
    Get Android Source Code
    Spinner Animation
    Java 笔记09
    Java 笔记07
    Java 笔记08
    例题
    例题
  • 原文地址:https://www.cnblogs.com/mengfangui/p/9090223.html
Copyright © 2020-2023  润新知