hdarwin

htmlview

Aug 3rd, 2014
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.88 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="Cache-Control" content="no-cache" />
  6. <style>
  7.  a{
  8.     color:blue;
  9.     cursor:pointer;
  10.  }
  11.  a:hover{
  12.     color:red;
  13.  }
  14. </style>
  15. <script type="text/javascript">
  16. ele = ["script", "bgsound", "code", "rev", "kbd", "tbody", "shape", "usemap", "alt", "font", "xml", "onload", "style", "img", "title", "datetime", "menu", "tt", "tr", "param", "li", "source", "tfoot", "th", "listing", "input", "td", "main", "xmp", "dl", "blockquote", "fieldset", "rules", "big", "dd", "nohref", "nobr", "meter", "optgroup", "dt", "h5", "wbr", "name", "marquee", "charoff", "button", "isindex", "summary", "p", "coords", "small", "output", "div", "dir", "em", "height", "datalist", "frame", "ismap", "meta", "video", "hspace", "rt", "canvas", "vlink", "rp", "sub", "for", "headers", "bdo", "bdi", "vspace", "label", "content", "basefont", "version", "rel", "sup", "progress", "size", "alink", "method", "body", "noscript", "acronym", "menuitem", "base", "br", "address", "article", "strong", "legend", "src", "ol", "standby", "caption", "s", "dialog", "action", "col", "classid", "defer", "h2", "h3", "h1", "h6", "h4", "blink", "header", "href", "table", "nowrap", "select", "noframes", "span", "area", "mark", "start", "dfn", "strike", "scope", "scheme", "type", "cite", "thead", "lang", "head", "option", "form", "hr", "valign", "var", "link", "hreflang", "ruby", "b", "target", "colgroup", "align", "value", "keygen", "ul", "applet", "del", "iframe", "embed", "colspan", "declare", "pre", "frameset", "prompt", "figure", "compact", "plaintext", "onblur", "accept", "ins", "char", "width", "checked", "id", "axis", "rowspan", "media", "charset", "aside", "html", "nav", "details", "samp", "text", "profile", "map", "track", "object", "figcaption", "data", "class", "enctype", "a", "center", "textarea", "footer", "i", "clear", "q", "u", "time", "audio", "section", "abbr"]
  17. function dump(x){
  18.     for(var i in x){console.log(i)}
  19. }
  20. function add(x){
  21.     tag = document.getElementById("tag")
  22.     prop = document.getElementById("prop")
  23.     tag.textContent = ""
  24.     prop.innerHTML = ""
  25.     tmp = document.createElement(x)
  26.     for(var p in tmp){
  27.         try{
  28.             if(tmp[p].__proto__ == String.prototype) prop.innerHTML += p + "(String)" + "<br>"
  29.             else prop.innerHTML += p + "(" + tmp[p] + ")" + "<br>"
  30.         }catch(e){
  31.             prop.innerHTML += p + "(Null)" + "<br>"
  32.         }
  33.     }
  34.     tag.innerHTML = x + "<br>(" + tmp.toString() + ")"
  35. }
  36. window.onload = function(){
  37.     for(i = 0; i < ele.length; i++){
  38.         tmp = document.createElement(ele[i])
  39.         if(tmp.toString() == "[object HTMLUnknownElement]") continue
  40.         document.getElementById("list").innerHTML += "<a onclick=\"add('"+ ele[i] +"')\">"+ele[i]+"</a> | "
  41.     }
  42. }
  43. </script>
  44. <body>
  45. <table border="1" id="tb">
  46. <tr>
  47.     <td id='list' colspan="2"></td>
  48. </tr>
  49. <tr>
  50.     <td width="200px" align="center" id="tag">TAG</td><td id="prop">ATTRIBUTE</td>
  51. </tr>
  52. </table>
  53. </body>
  54. </html>
Advertisement
Add Comment
Please, Sign In to add comment