Hello,
Eduardo Jauch absolute right as usual!)
A bit more in detail, set hidden style for input and give name to it. Then use in your JS following statement: document.getElementById('"+Input.Id+"').value =YourValue.
If vice versa use the OutSystems variable in JS, then: var JSVar = '" + OutsystemsVar + "'.
Good luck!