Consider the Object
The JavaScript language has developed into an important programming language. We explain the basics and provide examples for accessing an open HTML page through the DOM interface.
|
Lead Image © radiantskies, 123RF.com
The JavaScript language has developed into an important programming language. We explain the basics and provide examples for accessing an open HTML page through the DOM interface.
With most web applications and dynamic websites, the program logic is on the server. A program written in PHP, Java, Python, or Perl generates HTML pages tailored to user requests. However, the browser itself includes a complete and very powerful run-time environment with its JavaScript interpreter.
JavaScript programs respond to user input and access the opened HTML page via a so-called DOM API. This interface between JavaScript and HTML lets you change attributes for each tag on the page, such as color, size, or visibility. It also lets you remove sections of a page or insert HTML elements anywhere (Figure 1).
Apart from being object oriented, JavaScript is very similar to the C programming language and shares many of the basic structures (loops, conditions, operators) of other languages, from Java to Perl. That's what makes the switchover so easy, as long as you use only the given procedural elements of the language that arrange the source code into routines to satisfy specific tasks.
[...]
Pages: 6
The one thing computers were designed for is coding. Everything else is just icing on the cake.
GitHub advertises the Atom text editor as a combination of the best features from vi, Emacs, Sublime, and Textmate with none of the inconveniences. GitHub hopes to attract new users with an editor that is nicely integrated with its own VCS.
Web page loading time relies on a complex interplay among the web server, the web page, and the web browser. Learning a few tricks can help speed up load times for the pages you create.
Earlier this week, Google released Crankshaft, a new compilation infrastructure for V8, Chrome's JavaScript engine.
Whether it be themes and templates, JavaScript or regex, responsive design or typography, resourceful web designers make work easier for themselves with the many freely available tools on the web.
© 2025 Linux New Media USA, LLC – Legal Notice