So I want to start off by saying that I am not the greatest in Javascript, ahah. I am starting off with some of the basics and so forth, but came on to a problem that I seem to need help with.
I am trying to get a function to write to a textarea. Below is what I am trying to get at:
User Inputs Number > Presses Button > Writes to text area
Inputs in input box > Button onclick to function > function takes number and puts it to textarea
My code so far is below, but I am having troubles. I can get everything to show up in alert or document.write, but I have failed many times at getting it to write to a textarea.
Please do not give me the entire code. I just need a simple few lines showing how to get my function to write to text area..Thats it. So without further bickering, heres what I have so far:
Code:
<html>
<head>
<script type="text/javascript">
function calculate() {
var x = document.getElementById("one").value;
alert(x);
}