Skip to content

Instantly share code, notes, and snippets.

@nishnik
Created April 19, 2018 09:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nishnik/317b1ea620411906612026a740921f4d to your computer and use it in GitHub Desktop.
Save nishnik/317b1ea620411906612026a740921f4d to your computer and use it in GitHub Desktop.
Feedback - erp
var val = "3"
var radio_buttons = document.querySelectorAll('input[value="' + val +'"]');
var i = 0;
for (i=0; i<radio_buttons.length ; i++){
radio_buttons[i].checked = true;
}
var radio_buttons = document.querySelectorAll('input[value="5' + val +'"]');
var i = 0;
for (i=0; i<radio_buttons.length ; i++){
radio_buttons[i].checked = true;
}
text_areas = document.querySelectorAll('textarea');
for (i=0; i<text_areas.length ; i++){
text_areas[i].innerText = "peaceful teacher";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment