nothing to say...
js中根据id获取标签:
/** * 根据id获取标签 * @param {string}id * @returns {object} */ function $(id) { return typeof id === 'string' ? document.getElementById(id) : null; }