# Dynamic HTML

Dynamic HTML (DHTML), which Microsoft introduced with Internet Explorer 4.0, allows you to create much richer HTML that responds to events on the client. By upgrading your HTML pages to take advantage of DHTML, you will not only enhance the user experience, you will also build Web applications that use server resources more efficiently.

DHTML controls the appearance of HTML pages by setting properties in the document object model (DOM), a model which Microsoft has proposed to the World Wide Web Consortium (W3C) as a standard. DHTML exposes an event model that allows you to change DOM properties dynamically. The following simple example demonstrates subdividing an HTML page with <DIV> tags, and setting the display style property so that it displays the division when the user clicks an input button.

    <SCRIPT LANGUAGE = "VBScript">

    Sub showit()
      'This subroutine is called when the user clicks a select button.
      'It displays text in the hidden DIV.
      document.all.MyDiv.style.display = ""
    End Sub

    </SCRIPT>

    <DIV ID= "MyDiv" style="display: 'none'" >
    This is some hidden text.
    </DIV>
    <Select id= "Showit" onclick=showit>

For more information on DHTML, see the MSDN Online homepage.

© 1997-2001 Microsoft Corporation. All rights reserved.