Integrating Skulpt and the DOM
from document import * p = getElementById('myp') p.innerHTML = 'foo' div = getElementById('example2') h1 = createElement("h1") h1.innerHTML = 'HELLO' h1.setCSS('color','#f00') div.appendChild(h1) l = getElementsByTagName('h1') for e in l: print e.innerText ct = getElementsByName('loopcount')[0].value print ct for i in range(int(ct)): print i
How many times to loop
Run
Output should appear here