I am trying to write code to reverse my text. Ex: Apple is Fruit --> Fruit Is Apple. I written code which is not working. Thanks for the help!
<html>
<body>
<center>
<form>
<textarea autocomplete="off" cols="30" id="TextInput1" name="message" rows="5" style="border: 3px solid #73AD21; width: 40%;"></textarea>
<textarea autocomplete="off" cols="30" id="TextInput2" name="message" rows="5" style="border: 3px solid #73AD21; width: 40%;"></textarea><br />
<input id="WhiteSpaceRemove" onclick="myFunction()" style="border: 3px solid #73AD21;" type="button" value="Convert" />
</form>
</center>
<script>
function myFunction() {
var x = document.getElementById("TextInput1").value;
document.getElementById("TextInput2").innerHTML = x.reverse();
document.getElementById("CopyButton").value = "Copy Text!";
}
</script>
</body>
</html>