Added support for <select> elements with multiple attribute

When the multiple attribute is combined with the size attribute, the user is able to select multiple items from a list of options. The selectedIndex property returns only the index of the first selected item. Consequently, we must check the selected attribute of each <option> element to ensure that all selected items are preserved.