Test­ing the DOM API

OpenSource For You - - DEVELOPERS INSIGHT -

Here, you will be pro­vided sam­ples for ev­ery in­ter­face that you can use in Web de­vel­op­ment. In some cases, the sam­ples are com­plete HTML pages, with the DOM ac­cess in a <script> el­e­ment, the in­ter­face (e.g., but­tons) nec­es­sary to fire up the script in a form, and the HTML el­e­ments upon which the DOM op­er­ates listed as well. When this is the case, you can cut and paste the ex­am­ple into a new HTML doc­u­ment, save it, and run the ex­am­ple from the browser.

There are some cases, how­ever, when the ex­am­ples are more con­cise. To run ex­am­ples that only demon­strate the ba­sic re­la­tion­ship of the in­ter­face to the HTML el­e­ments, you may want to set up a test page in which in­ter­faces can be

eas­ily ac­cessed from scripts.

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.