JSFiddle - React, Tailwind, and code Playground

by rjurd

HTML

<form id='myform' enctype='multipart/form-data'>
    <label for='PF1'>Nothing</label>
    <input checked type="radio" id="PF1" name="rdopaymenttype" value="4" />
    <label for='PF2'>Upload</label>
    <input checked type="radio" id="PF2" name="rdopaymenttype" value="5" />
</form>

JavaScript

window.onload = function() {

    var pf1 = document.getElementById('PF1');
    var pf2 = document.getElementById('PF2');
    var myform = document.getElementById('myform');
    pf1.onclick = function() {
        myform.setAttribute('action','xyz.asp');
    }
    pf2.onclick = function() {
        myform.setAttribute('action','abc.asp');
    }
}