配置javascript.json用户代码片段

{

    "打印文本": {

        "prefix": "log",

        "body": [

            "console.log($1);"

        ],

        "description": "打印输出"

    },

    "根据id获取元素": {

        "prefix": "dgi",

        "body": [

            "document.getElementById('$1');"

        ],

        "description": "根据id获取元素"

    },

    "根据标签名获取元素": {

        "prefix": "dgt",

        "body": [

            "document.getElementsByTagName('$1');"

        ],

        "description": "根据标签名获取元素"

    },

    "根据类名获取元素": {

        "prefix": "dgc",

        "body": [

            "document.getElementsByClassName('$1');"

        ],

        "description": "根据类名获取元素"

    },

    "h5获取元素": {

        "prefix": "dqs", 

        "body": [

            "document.querySelector('$1');"

        ],

        "description": "h5获取元素"

    },

    "h5获取所有": {

        "prefix": "dqa",

        "body": [

            "document.querySelectorAll('$1');"

        ],

        "description": "h5获取元素"

    }

}

你可能感兴趣的:(配置javascript.json用户代码片段)