JavaScript
JavaScript is an interpreted language often used on the client side. It
can be used to modify the content of a page, respond to events and make
requests. It is also useful for client side form validation. This can
decrease server load by not sending invalid requests, but data must be
validated on the server as well because client side validation is very
easy to bypass. Javascript is included in HTML using <script> tags
either inline or externally.
<!-- Inline -->
<script type = "text/javascript">
window.alert("Inline Javascript");
</script>
<!-- External -->
<script type = "text/javascript" src = "scripts/external.js"></script>
Like Python there are plenty of resources to learn JavaScript.
Document Object Model
The Document Object Model (DOM) is a tree of the HTML elements in a page. JavaScript can access the DOM to make changes to the page. Elements can be accessed by their id, tag name and class. Any property of the element can then be modified using JavaScript, such as the style or text.
Events
Events are created in response to user actions with a page. Events can
be triggered by the page loading, the user clicking something, a
keypress or hovering over an element. To respond to an event you add a
handler function using addEventListener.
Event bubbling
Event bubbling is a feature of JavaScript where when an event is occurs,
it first checks if the element it happened to has any handlers, then if
it's parent has any, then it's grandparent all the way up to the top.
The events are said to bubble up from the deepest nested element to it's
parents. To stop bubbling, use event.stopPropagation.
JQuery
JQuery is a JavaScript library which simplifies DOM interactions and asynchronous requests.
AJAX
AJAX, which stands for Asynchronous JavaScript And XML, is a technique
which allows asynchronously updating the page without reloading.
Requests are sent asynchronously (in the background) so the user can do
other things whilst the request is being served. Whilst data can be
returned as XML, it is more common to use JSON now. XML (eXtensible
Markup Language) is markup language for storing data using HTML-like
arbitrary tags. In JavaScript, AJAX requests are sent using
XMLHTTPRequest objects. JQuery provides the much simpler $.ajax.