The JavaScript switch statement can be a little confusing but it is a powerful alternative to several lines of if .. then ..else and goes one step further than the vbScript Select Case statement.
This article provides an example on how to set attributes to a collection of elements by using the Document Object Model (DOM) getElementsByTagName() method. A sample is provided using JavaScript in the client's browser.
This article provides examples of validating input fields by removing leading and trailing spaces for text input as well as removing leading and trailing linefeeds in textareas.
Checking for blank or required fields and preventing form submission or further processing can be accomplished in DHTML with DOM and JavaScript methods , properties and events.
Applying events to HTML or XHTML web page elements can be done by setting event properties directly in the tag code or by using the DOM and some JavaScript code.The area of least compliance between browsers and the DOM is the event object model, yet events...
Using the HTML DOM in web design allows the use of Dynamic HTML (DHTML), saves on bandwidth costs and helps overcome cross-browser web page rendering problems. This article illustrates setting the basic property of an HTML input element using...