|
Subject:
|
New JavaScript DOM article posted
|
|
Posted By:
|
jminatel
|
Post Date:
|
8/26/2006 1:43:09 PM
|
We've posted a new excerpt article on Wrox.com that should be of interest to the JavaScript professionals in this forum. The article is:
JavaScript DOM Ranges, By Nicholas C. Zakas, excerpted from his book Professional JavaScript for Web Developers. The article begins:
quote: The DOM is a very exciting set of functionality for web pages, but most of the attention has been drawn by the standard DOM functionality. Many developers are unaware that the DOM has much more to offer than just createElement() and appendChild(); DOM ranges are a very powerful tool for dynamic web page manipulation.
A range can be used to select a section of a document regardless of node boundaries (note that the selection occurs behind the scenes and cannot be seen by the user). Ranges are helpful when regular DOM manipulation isn't specific enough to change a document.
DOM Level 2 defines a method called createRange() to, well, create ranges. In DOM-compliant browsers (not Internet Explorer, by the way), this method belongs to the document object, so a new range can be created like this:
var oRange = document.createRange();
We hope you enjoy the complete article.
Jim Minatel Senior Acquisitions Editor Wiley Technology Publishing WROX Press Blog: http://wroxblog.typepad.com/ Jim's Book of the week: No book this week - Donate to the Red Cross!
|
|