JavaScript and JQuery ===================== JavaScript (/ECMAScript): http://en.wikipedia.org/wiki/JavaScript JavaScript is an in-browser programming language designed to provide customization of interactive behavior and reduce real or apparent user-interface latency (e.g. avoid up-front server round trips -- see AJAX, below). JavaScript examples ------------------- Dynamically creating text in a variety of ways: https://github.com/ctb/cse491-serverz/tree/day16/js-examples/ex1.html https://github.com/ctb/cse491-serverz/tree/day16/js-examples/ex2.html https://github.com/ctb/cse491-serverz/tree/day16/js-examples/ex3.html (and https://github.com/ctb/cse491-serverz/tree/day16/js-examples/hello.js) https://github.com/ctb/cse491-serverz/tree/day16/js-examples/ex4.html Interaction with the user: https://github.com/ctb/cse491-serverz/tree/day16/js-examples/ex5.html Interaction with forms: https://github.com/ctb/cse491-serverz/tree/day16/js-examples/ex6.html Variables and oddities: https://github.com/ctb/cse491-serverz/tree/day16/js-examples/ex7.html Object oriented programming: https://github.com/ctb/cse491-serverz/tree/day16/js-examples/ex8.html Modifying the current page's title through Document Object Model access: https://github.com/ctb/cse491-serverz/tree/day16/js-examples/ex9.html JQuery examples --------------- Since JavaScript is one of the worst possible languages actually in wide use (it's needlessly inconsistent and largely incoherent) a number of frameworks have popped into existence to help programmers actually make effective use of it. JQuery (http://jquery.org/) is one such framework; it's relatively small, fast, and concise. JQuery uses two nice basic concepts: *selectors*, and *chaining*. Selectors let you pick out sets or subsets of elements based on CSS-style patterns: https://github.com/ctb/cse491-serverz/tree/day16/jquery-examples/ex1.html Chaining lets you apply multiple functions in sequence without respecifying which elements you want to modify: https://github.com/ctb/cse491-serverz/tree/day16/jquery-examples/ex2.html You can specify all sorts of fun tricks: https://github.com/ctb/cse491-serverz/tree/day16/jquery-examples/ex3.html