Dynamically Changing Content without DHTML

Dynamically Changing Content without DHTML

The DHTML capabilities (such as changing the text color/fonts/size dynamically) are very nice features to have, but unfortunately, they are not available on all browser applications. Essentially, DHTML features work only on the Internet Explorer Web browser. This example explains how to achieve dynamic features within a normal HTML document even on browsers like Netscape Navigator. The method explained here makes use of the ‘innerHTML’ property of the

objects in the Internet Explorer and the ‘layer’ objects in Netscape Compatible browsers.

The example below explains how to use the in conjunction with the


I am a normal text!

The following JavaScript method is called on by clicking the form button (changing the contents could happen on any other event like onmousemove, onmouseout etc.).


Here the Internet Explorer makes use of the

tags, whereas Netscape Navigator makes use of the ‘layer’ object to dynamically change its content. Using this method and a little bit of imagination, you can add some ‘dynamism’ to your Web pages on any browser.

See also  5 Ways to Improve Customer Experience

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist