Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <title>Methods for retrieving element attributes - JS Bin</title>
  <meta name="description" content="Methods for retrieving element attributes">
  
  <script src="https://cdn.rawgit.com/lodash/lodash/3.10.1/lodash.min.js"></script>
  <script>var lodash = _.noConflict();</script>
  <script src="//jashkenas.github.io/underscore/underscore-min.js"></script>
  <script>var underscore = _.noConflict();</script>
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
</head>
<body>
  <h1>Methods for retrieving element attributes</h1>
  
  <h2>Examined element (original markup)</h2>
  <p class="output"><code id="showSource"></code></p>
  
  <h2>Examined element, as interpreted by the browser (<code>element.outerHTML</code>)</h2>
  <p class="output"><code id="showOuterHtml"></code></p>
  
  <script>
    var testNodeHtml = '<p id="foo" class="bar" lang="en" type="text/x-template" hidden contenteditable=""></p>';
    document.write( testNodeHtml );
  </script>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
hashchangepro
0viewers