Created
October 9, 2021 09:58
-
-
Save AakashCode12/df135db94472c73ea47b2f4ad7e7e15a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// My method with jquery | |
//it has 2 parts first paste part 1 and then wait for 2-3 seconds as per ur internet connection to download jquery in client side of the browser | |
//part 1 | |
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
// ... give time for script to load, then type (or see below for non wait option) | |
jQuery.noConflict(); | |
// part 2 | |
$('input[type=radio][value="1"]').prop('checked', true); | |
//----------------------------------------------------------------------------------------------------------------- | |
// gabriel's Code with no JQUERY | |
document.querySelectorAll('input[type=radio][value="1"]').forEach(x => x.checked = true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This Code needs to be pasted in the console section
PRESS CTRL+SHIFT + I
go to console and paste the code
you can even use gabriel's code if my code doesn't work