I am creating a bunch of radio buttons for each row in HTML and I cannot figure out a way to store the user-selected radio button for each row using the localStorage method in Javascript and also cannot figure out how to retrieve and display it on the web page.
This is my code snippet for the radio buttons in HTML:
<input type="radio" id="r1" name="radio" value="1">
<input type="radio" id="r2" name="radio" value="2">
<br>
<input type="radio" id="r11" name="radio2" value="1">
<input type="radio" id="r22" name="radio2" value="2">
Please suggest to me a way and send a code snippet of how I can store the selected radio buttons in localStorage and retrieve it to a page. Please don't recommend me using a database as this project is due shortly.