Unobtrusive JavaScript  Unobtrusive JavaScript is a general approach to the use of JavaScript in web pages. Though the term is not formally defined, its basic principles are generally understood to include separation of functionality (the "behavior layer") from a Web page's structure/content and presentation, and progressive enhancement to support user agents that may not support certain JavaScript functionality and users that have disabled JavaScript. The emergence of standards-compliant browsers, JavaScript frameworks, and high-quality debugging tools have made organized, scalable JavaScript code possible, and the emergence of Ajax interfaces has made it desirable. Whereas JavaScript was once reserved for relatively simple and non-critical tasks such as form validation and decorative novelties, it is now used to write large, complex codebases that are often part of a site's core functionality. The concept of "unobtrusiveness" in relation to JavaScript programming was coined in 2002 by Stuart Langridge in the article "Unobtrusive DHTML, and the power of unordered lists". In the article Langridge argued for a way to keep all JavaScript code, including event handlers, outside of the HTML. Stuart Langridge has since expanded upon this thought in book and article format. Other authors have tried to refine and define the essential elements of unobtrusiveness. David Flanagan's book "JavaScript: The Definitive Guide" said that while there is no specific formula, there are three main goals:  The Web Standards Project described four benefits of unobtrusive DOM scripting in their "JavaScript Manifesto". For the Paris Web Conference in 2007, Christian Heilmann identified seven rules of Unobtrusive JavaScript. Traditionally, JavaScript was often placed inline together with an HTML document's markup. For example, the following is a typical way to register a JavaScript event handler in HTML:  The purpose of HTML markup is to describe a document's structure, not its programmatic behavior. Combining the two can negatively impact a site's maintainability, like combining content and presentation. JavaScript behavior created and referenced in the HTML can be harder to use and maintain, for example when setting handlers for several events on a single element, when setting the same event handler on several elements, or when using event delegation. The unobtrusive solution is to register the necessary event handlers programmatically, rather than inline. Rather than adding an codice_2 attribute explicitly as above, the relevant element(s) are simply identified, for example by codice_3, codice_4 or some other means in the markup:  A script that runs when the page is first loaded into the browser can then look for each relevant element and set it up accordingly: window.addEventListener("DOMContentLoaded", function(event) {  Unobtrusive JavaScript should add as little as possible to the global object or global namespace of the environment in which it runs.