CD-510 Part VI . Appendixes Example The function (Web hosting colocation)
CD-510 Part VI . Appendixes Example The function in Listing 26-6 that accesses the chosen value the long way can be simplified for newer browsers only with the following construction: function seeColor(form) { document.bgColor = form.colorsList.value } Methods item(index) namedItem( optionID ) NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Example The following statement assigns an OPTION element reference to a variable: var oneOption = document.forms[0].mySelect.namedItem( option3_2 ) Event handlers onChange NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Example Listing 26-8 is a version of Listing 26-6 that invokes all action as the result of a user making a selection from the pop-up menu. The onChange event handler in the