Home >Web Front-end >HTML Tutorial >There is a one-to-one correspondence between radio buttons and the number of data items. How to assign a value to the button? _html/css_WEB-ITnose

There is a one-to-one correspondence between radio buttons and the number of data items. How to assign a value to the button? _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:09:261264browse

Since the number of data retrieved from the database is variable, the number of radio buttons is also variable. How to determine the value of the radio button?


Reply to discussion (solution)

Assign values ​​together when generating radio buttons

I hope the value will be increasing, but the number of buttons It is determined based on the number of data items. It is dynamically generated.

can obtain data, and the number can also be obtained.

How to assign dynamic values ​​to radio buttons in HTML?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn