data-自定义属性名
获取自定义属性值 event.target.dataset.aid
eg:
<body><button id="btn" data-aid="123456" onclick="go(event)">btn</button><script>function go(event){console.log("hello world"); //hello worldconsole.log(event.target.dataset.aid) //123456}</script></body>
给某个 DOM 添加,属性:
let id = getElementById('app');id.setAttribute('onlyId',2);
