Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8" />
- <meta http-equiv="Cache-Control" content="no-cache" />
- <style>
- a{
- color:blue;
- cursor:pointer;
- }
- a:hover{
- color:red;
- }
- </style>
- <script type="text/javascript">
- 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"]
- function dump(x){
- for(var i in x){console.log(i)}
- }
- function add(x){
- tag = document.getElementById("tag")
- prop = document.getElementById("prop")
- tag.textContent = ""
- prop.innerHTML = ""
- tmp = document.createElement(x)
- for(var p in tmp){
- try{
- if(tmp[p].__proto__ == String.prototype) prop.innerHTML += p + "(String)" + "<br>"
- else prop.innerHTML += p + "(" + tmp[p] + ")" + "<br>"
- }catch(e){
- prop.innerHTML += p + "(Null)" + "<br>"
- }
- }
- tag.innerHTML = x + "<br>(" + tmp.toString() + ")"
- }
- window.onload = function(){
- for(i = 0; i < ele.length; i++){
- tmp = document.createElement(ele[i])
- if(tmp.toString() == "[object HTMLUnknownElement]") continue
- document.getElementById("list").innerHTML += "<a onclick=\"add('"+ ele[i] +"')\">"+ele[i]+"</a> | "
- }
- }
- </script>
- <body>
- <table border="1" id="tb">
- <tr>
- <td id='list' colspan="2"></td>
- </tr>
- <tr>
- <td width="200px" align="center" id="tag">TAG</td><td id="prop">ATTRIBUTE</td>
- </tr>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment