HTML5 允许扩展的(自制的)属性,以 data- 开头
<label id="id0" data-value="0">0</label>
<label id="id1" data-value="1">1</label>
<script>
var id0Value = $("#id0").attr("data-value");
var id1Value = $("#id1").attr("data-value");
alert('id0 value is ' + id0Value);
alert('id1 value is ' + id1Value);
</script>