Welcome back everyone.
All right so we had to change the text and I've shown you how to use variables and what variables are.
But one thing we need to do is take an input from the user.
Now this is pretty much what computer programming is.
You take input and you do something with it so it reacts to the input that that is that is in the computer
is actually fairly simple.
So what we need to do is you need to just type in inputs and it's pretty simple just like an input like
this.
And you'll notice that an input box comes up like this and you can type in whatever text you want there.
But we do need to type in a couple of the things we need to type in the word type.
And you can put in just text like this.
And this way it will only take in text so remember how I told you there was integers strings and booleans
and all these different kinds of variables in this input box.
We're just going to be taken in text.
And the reason why this is important is that if you ever want to add numbers together you do have to
take in a different kind.
All right.
The second thing you need to do is need to add in an ID so we're going to go ID equals and add those
to apostrophe's there and go change user text.
Okay.
So just go ahead and we'll do that here.
Now what we need to do is what will happen is that once we go ahead and put in some texture we need
to find this ID here.
Now I'm just going to put the go to the javascript here.
Now you might be thinking that we could just add in another document and get Elman ID etc. but we can't
exactly do it like that.
We need to add another variable here.
OK and we're going to just add in a VAR.
OK.
And we're going to call this change
text and then we're going to call this variable
just like this.
And then what we need to do is we're going to go to documents Daut get elements by ID right.
And then what we're going to do is we're going to use this exact same ID which is changes are text and
I was going to copy and paste in there make sure there's no spaces in between.
For example if you see that there is a space in here you definitely do not want that.
OK.
And we'll just go ahead and close that off there.
And the only other thing you need to do is type in Daut value.
OK.
So now change text variable is now equal to whatever we put in there.
OK.
The only thing you need to do is put in where he was equal signs is we need to just type in change text
variable.
And if you want to copy and paste that you're more and walk do you can double click it and you can see
the box shows around that meaning that it does work.
So if you go change the text it doesn't do anything.
But if we do in this case let's change it to a name like awesome and we go change the text.
It changes that.
Awesome.
And we can go to.
Awesome.
Five and you can see it goes to awesome five.
We can say as we change the text just like that and there we go that's all it is.
So what we have to do is we had to set up a variable that took this in here.
Now I'll talk a little bit about this in the next tutorial.
But you'll notice that the variable is inside the function and not outside right.
I'll talk about that in the next the next tutorial so you guys next time.