javascript">function doSomething(e) {
    console.log(e)
}

m(&quot;div&quot;, {onclick: doSomething})
</code></pre>
<hr>
<h3 id="properties"><a href="#properties">Properties</a></h3>
<p>Mithril supports DOM functionality that is accessible via properties such as <code>&lt;select&gt;</code>&#39;s <code>selectedIndex</code> and <code>value</code> properties.</p>
<pre><code class="lang-javascript">m(&quot;select&quot;, {selectedIndex: 0}, [
    m(&quot;option&quot;, &quot;Option A&quot;),
    m(&quot;option&q