I have a simple web form that uses JavaScript for building a POST statement. In Chrome, I can use a simple line of code...
var form = document.forms[\'myForm\'];
You can try this:
var form = document.querySelector('form#myForm'); var env_value = form.querySelector('[name="env"]:checked').value;