/* appjet:version 0.1 */

/* In AppJet, normal strings will be escaped for HTML printing */
print("Th1s 1s 1337 H4x0R <html>.");
print("1 pwn n000b5.");

/* Unless you'd prefer to print raw html... */
print(raw("""
<center>
  <p><b>Some bold text in the center, printed with raw()</b></p>
</center>
"""));

/* You can also use our nifty tag system for more concise 
   programmatic HTML generation. */
print(CENTER(P(B("This text is also in the center."))));

/* If the first argument to a tag function is an object, it gets 
   converted to attribute/value pairs */
print(DIV({id: "maindiv"}, P("Text inside a div.")));

/* You can then style elements using CSS by creating a CSS 
   section. */

/* appjet:css */
div#maindiv {
    color: blue;
    background: #abcdef;
    padding: 0.5em;
    margin: 1em;
}

/* To get back to javascript, create a new "server" section. */

/* appjet:server */

/* You can also specify styles on a per-item level by using a
   "style" attribute. */

print(DIV({style: "color: red"}, "Some red text."));



© Copyright 2007-2008 AppJet Inc.