Difference between revisions of "DOM Controls that do things"

From ProgZoo
Jump to navigation Jump to search
Line 1: Line 1:
<pre id='shellbody' data-qtp='fetch'></pre>
<pre id='shellbody' data-qtp='clicky'></pre>
<div class=qu>
<div class=qu>
<pre class=usr>
<pre class=usr>

Revision as of 17:55, 4 September 2021


let b = document.createElement('button');
b.innerText = 'click me';
b.onclick = ()=>{
  document.body.append('Hello world');
}
document.body.append(b);
let b = document.createElement('button');
b.innerText = 'click me';
b.onclick = ()=>{
  document.body.append('Hello world');
}
document.body.append(b);