Skip to end of metadata
Go to start of metadata

JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat.

Javascript is usually combined with HTML5 to implement rich UI. Below is useful information:

  • Page:
    Check whether a checkbox is checked in Javascript (Knowledge Base) Checkbox object in HTML has a property checked as boolean - it has true or false, so javascript can check its status easily.
  • Page:
    Input Text readOnly Property in Javascript (Knowledge Base) —  Set a text field to read-only in javascript
  • Page:
    Draggable DIV tag combined with Javascript (Knowledge Base) — For draggable DIV tag, what you need to keep in mind is "position: absolute" in style sheet.
  • Page:
    Drag and drop image in div tag in Javascript/HTML5 (Knowledge Base) — Drag and drop is a very common feature. It is when you "grab" an object and drag it to a different location. In HTML5, drag and drop is part of the standard: Any element can be draggable. The element you should keep in mind is draggable="true" ondragstart="func(event)" for starting drag, and ondrop="drop(event)" ondragover="allowDrop(event)" for accepting dragging.
  • Page:
    HTML5 (Knowledge Base) HTML5 is a software solution stack that defines the properties and behaviors of web page content by implementing a markup based pattern to it. HTML5 is the fifth and current major version of HTML, and subsumes XHTML.
  • Page:
  • Page:
    HTML5 Canvas (Knowledge Base) — The HTML5 <canvas> tag is used to draw graphics, on the fly, via scripting (usually JavaScript). However, the <canvas> element has no drawing abilities of its own (it is only a container for graphics) - you must use a script to actually draw the graphics. The getContext() method returns an object that provides methods and properties for drawing on the canvas.
  • Page:
    Adding HTML content dynamically by innerHTML (Knowledge Base) — When you assign ID for HTML entity for <p> tag or <div> tag, we can dynamically update its content. You can find the object by getElementById(), and do the necessary actions into innerHTML. For instance, you can do it like document.getElementById( "element_id").innerHTML = "hello, world!";
  • Page:
    Playback Video in HTML5 (Knowledge Base) — In HTML5, playback video is super easy by <video width="...." height="...." autoplay> tag. You can also set its source by <source src="movie.mp4" type="video/mp4"> tag.
  • Page:
    jQuery (Knowledge Base) — jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.
  • Page:
    react.js (Knowledge Base) React is a JavaScript library for building user interfaces. It is maintained by Facebook and a community of individual developers and companies. React can be used as a base in the development of single-page or mobile applications.
  • Page:
    node.js (Knowledge Base) — Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
  • Page:
  • Page:
    Drawing rectangle (Knowledge Base) — In order to draw rectangle, you can use rect( x, y, width, height).
  • Page:
    Drawing circle (Knowledge Base) arc( x, y, radius, sAngle=0, eAngle=0) enables you to draw a circle easily.