+ 2

How can I get value from a text input area to a variable

1st Mar 2017, 8:49 AM
Nuwan Rathnayaka
Nuwan Rathnayaka - avatar
5 Respuestas
+ 2
Yes you can also get the input bu prompting the user with prompt(); but that is not ideal, it gets really annoying for the user. i would suggest to use getElementById to get the value of a html text box, or textarea in your case
1st Mar 2017, 9:12 AM
RJP
RJP - avatar
+ 1
var myValue = document.getElementById("myTextAreaID").value
1st Mar 2017, 9:09 AM
RJP
RJP - avatar
0
Thank you all☺☺
1st Mar 2017, 9:17 AM
Nuwan Rathnayaka
Nuwan Rathnayaka - avatar
- 1
use java Script var v=Prompt("Enter the value");
1st Mar 2017, 9:41 AM
Bharath yadav
Bharath yadav - avatar
- 2
u can use a prompt box to take a value from the user using JavaScript
1st Mar 2017, 9:09 AM
Rahul Nishar
Rahul Nishar - avatar