JSFiddle - React, Tailwind, and code Playground

HTML

<form id="login_form" action="">
<input type="text" action="post" name="txtUserName" id="txtUserName" />
<input type="text" action="post" name="txtUserName" id="txtUserName" />
<input type="text" action="post" name="txtUserName" id="txtUserName" />
</form>

JavaScript

function abc()
{
    document.getElementById('txtUserName').name="ID_USERNAME"
    document.getElementById('login_form').action = "the_url";
    //check..
    alert(document.getElementById('txtUserName').name );
    alert(document.getElementById('login_form').action );
}
abc();