def __init__(self): xhtml.webpage.__init__(self) self.includes.css <= sys.modules[__name__] self.header = MyDiv(parent = self.body, text = 'CLICK ON ME') self.side_bar = xhtml.div(parent = self.body, text = 'HELLO') self.side_bar.style.background_color = css.rgb(255, 0, 0) self.cont = xhtml.div(parent = self.body)
def onmousedown(self, event): self.style.background_color = css.rgb(0, 255, 0) self.text += 'HI' for i in range(10): div = xhtml.div(parent = self.document.cont, text = 'ME')