tailieunhanh - Javascript bible_ Chapter 24

Tham khảo sách 'javascript bible_ chapter 24', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Select and FileUpload Objects Selection lists whether in the form of pop-up menus or scrolling lists are space-saving form elements in HTML pages. They allow designers to present a lot of information in a comparatively small space. At the same time users are familiar with the interface elements from working in their own operating systems preference dialog boxes and application windows. However selection lists are more difficult to script because the objects themselves are complicated entities. As you can see throughout this chapter the references necessary to extract information from a list can get pretty long. The results however are worth the effort. The other object covered in this chapter the fileUpload object is frequently misunderstood as being more powerful than it actually is. It is alas not the great file transfer elixir desired by many page authors. Select Object In This Chapter Triggering action based on a user s selection in a pop-up or select list Modifying the contents of select objects Using the fileUpload object Properties Methods Event Handlers length blur onChange name focus onFocus options i selectedIndex handleEvent onBlur options i .defaultSelected options i .index options i .selected options i .text continued 484 Part III JavaScript Object and Language Reference Properties Methods Event Handlers options i .value type Syntax Creating a select object FORM SELECT NAME listName SIZE number MULTIPLE onBlur handlerTextOrFunction onChange handlerTextOrFunction onFocus handlerTextOrFunction OPTION SELECTED VALUE string listItem . OPTION VALUE string listItem SELECT FORM Accessing select object properties window. window. index . window. index .property window. index . index .property About this object Select objects are perhaps the most visually interesting user interface elements among the standard built-in objects. In

TỪ KHÓA LIÊN QUAN