<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript" src="../ajax/ajaxdemo/js/jquery-2.1.4.min.js" ></script>
</head>
<body>
<div id="a" data-one="one" data-one-two="two" vava="vava"></div>
</body>
</html>
<script>
var a=document.getElementById('a');
console.log(a.dataset.one);
console.log(a.dataset.oneTwo);
// jq通过data方法取值
alert($('#a').data('one'));
alert($('#a').attr('data-one'));
</script>
dataset.one
dataset.oneTwo
$().data();
attr();