Search
 
SCRIPT & CODE EXAMPLE
 

HTML

Testing the dom api

<html>
<head>
  <title>DOM Tests</title>
  <script>
    function setBodyAttr(attr, value) {
      if (document.body) document.body[attr] = value;
      else throw new Error("no support");
    }
  </script>
</head>
<body>
  <div style="margin: .5in; height: 400px;">
    <form>
      <p><b><code>text</code></b></p>
      <select onChange="setBodyAttr('text',
        this.options[this.selectedIndex].value);">
        <option value="black">black</option>
        <option value="red">red</option>
      </select>
      <p><b><code>bgColor</code></b></p>
      <select onChange="setBodyAttr('bgColor',
        this.options[this.selectedIndex].value);">
        <option value="white">white</option>
        <option value="lightgrey">gray</option>
      </select>
      <p><b><code>link</code></b></p>
      <select onChange="setBodyAttr('link',
        this.options[this.selectedIndex].value);">
        <option value="blue">blue</option>
        <option value="green">green</option>
      </select>
      <small>
        <a href="http://some.website.tld/page.html" id="sample">
          (sample link)
        </a>
      </small><br />
      <input type="button" value="version" onclick="ver()" />
    </form>
  </div>
</body>
</html>
Comment

PREVIOUS NEXT
Code Example
Html :: git compare files with different names 
Html :: html para pdf 
Html :: command checked datagrid wpf 
Html :: kode vidio dalam html 
Html :: pug html adalah 
Html :: divide in single rows html using div 
Html :: el barka mouse 
Html :: How to create collapsable using pure Javascript 
Html :: navbar html css 
Html :: html non importa immagini in webpack 
Html :: step 47 freecodecamp nutrition table 
Html :: twig pagination bootstrap 5 
Html :: textarea set character limit 
Html :: link href to a class on another page 
Html :: htmlagility treeview 
Html :: echo htmlspecialchars($_SERVER["PHP_SELF"]); y ajax 
Html :: plantuml multiline footer 
Html :: Style 
Html :: angular material tags list 
Html :: etiquetas html para seleccionar imagenes 
Html :: Center-aligned media 
Html :: edit wordpress theme html 
Html :: show html in laravel template 
Html :: lit element double click 
Html :: html table fixe layout 
Html :: @click event disabled source 
Html :: how over mouse play video hml 
Html :: convert web to application 
Html :: html unidades de medida 
Html :: example for d3 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =