0

How can I use data-field in JavaScript?

<button onclick="btn()" data-field= "{ i: thevalueofi, j: tthevalueofj }"></button>
<script>
    function btn(){
        ???
        alert("data-field");
    }
</script>
arulmr
  • 8,620
  • 9
  • 54
  • 69
user2204438
  • 61
  • 2
  • 7
  • possible dublicate http://stackoverflow.com/questions/15779451/html-element-with-variable – Musa Apr 27 '13 at 05:09

0 Answers0