How to get the value selected by Radio, Checkbox and SELECT

xiaoxiao2021-03-13  194

1.Radio and Checkbox

Use the length attribute to get their elements, then use the checkage property to traverse each element, if == True is selected, if: for (VAR i = 0; I

2.Select

Single selection uses options.selectedIndex to get the selected index value, then use Options [index value] .Value to get the selected text multi-selection also use options.Length to get the number of elements, then use the selected property traversal

转载请注明原文地址:https://www.9cbs.com/read-129117.html

New Post(0)