Contents
About
Help
HTML Document
Please do not save test edits. If you want to experiment, please use the
sandbox.
By default, AppJet gives you a complete HTML document with a head and body. Anything you print goes into the body of the document. *You can easily include CSS and client-side JavaScript using AppJet code sections:* print(DIV({className:"funky"}, "Frickin' laser beams.")); /* appjet:css */ .funky { border: 2px dashed red; color: green; text-align: center; font-size: 200%; background: #ffc; } /* appjet:client */ alert("Prepare yourself for my funky page!"); /* appjet:server */ printp("And sharks."); Note that the beginning of your code is implicitly "appjet:server", but you can use this label explicitly to return to the server side in a later section. *Another way to interact with the existing document is to use the global page object.* page.setTitle("A Potentially Colorful Page"); page.head.write(""" """); print(H1("This page comes in different colors.")); printp(link("/?red","Red")); printp(link("/?green","Green")); printp(link("/?blue","Blue")); Above you can see how to set the title and write HTML to the head of the document programmatically. *You can use page.setMode("plain") to bypass the default document structure and take control of the whole page.* page.setMode("plain"); print(html("""
My Simple Page
I'm the
of the attention!
"""));