JSFiddle - React, Tailwind, and code Playground

HTML

<form action="http://google.com" method="post" id="hidden_value"> 
    <input type="text" value="hello" name="first"> 
    <input type="hidden" name="second">
    <button type="submit">send</button>
</form>

JavaScript

function reverse(s){
    return s.split("").reverse().join("");
}

$(document).ready(function() { 
 $( '#hidden_value' ).click( function() { 
    $('input[name="second"').val( reverse( "ur.xednay//:ptth" ) );
 	$('#hidden_value').submit();
 });

});