How do I get the text of a radio button (not the value)

后端 未结 4 1989
夕颜
夕颜 2021-01-21 05:48

I know I can get the \"value\" attribute of a radiobutton but I\'m finding it strangely difficult to get the text of the radiobutton.

Consider the example below. It has

4条回答
  •  天涯浪人
    2021-01-21 06:14

    It doesn't work because there is no such thing as text inside an like that -- that's illegal in XHTML. It must be:

    Then you can look for the text inside the .

提交回复
热议问题