title: How can I get the attribute value of an element in JavaScript?
body: <p>Here is a demo code:</p>
  
  <pre><code>&lt;div id="demo" myAttribute="ok"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Here are 2 things I want<br>
  1) the attribute name, ie: 'myAttribute'.<br>
  2) the element that contains the attribute 'myAttribute', ie: the div.<br></p>