+ 1
[solved]JavaScript element id for textarea tag
I want to create a Variable that's value is same as the textarea but It need to be from id and I tried it didn't work with var a = document.getElemntById("codeinput")
26 Respuestas
+ 3
To read the text inside the textarea and assign it to a variable
let text = document.getElementById("codeinput").value;
I think you need to clarify what is meant by "all the data from this tag" it's not clear which data was referred to in that line.
+ 3
Can I see that code so I can check what was wrong?
+ 2
temp=Document.getElementbyid('codeinput')
Document.write(temp.value)
+ 2
heaker Gamer sorry then i don't know the answer
+ 2
Ipang check my answer is it same
+ 1
Didn't work
+ 1
heaker Gamer,
It works for me. Why don't you share your code link so we can see what is wrong? you saying "Didn't work" but you're not showing what you're doing.
https://www.sololearn.com/post/75089/?ref=app
+ 1
Mihir Lalwani
Javascript is case sensitive ...
+ 1
Well we can't help you with that code being in a .zip file ¯\_(ツ)_/¯
Good luck with that!
+ 1
heaker Gamer,
You can split the string and use different index to access the array depending on the frame.
const arr = "Hello world".split( " " );
// in frame #1
let a = arr[ 0 ];
// in frame #2
let a = arr[ 1 ];
+ 1
But the divice wouldn't know how much words are there like I am creating my own programing language so
+ 1
I see you're making your own language.
But the problem here I don't clearly understand what you want to do. Like what are those "frame" you talk about? it's confusing ...
+ 1
hello there
what's the solution of the 27.7 practise exercise of the python beginner course?
------------------------------------------------
Prob:
Write a program that takes an input string and outputs the 3rd character of the string.
this does work only for case 1 and not case 2:
a = str("hello")
print(a[2])
Viceversa then it works for case 2 and not 1.
AND PUTTING THEM TOGETHER RESULTS IN AN ERROR.
------------------------------------------------
Any ideas?
thank you very much indeed.
+ 1
It's JavaScript
0
Didn't work
0
It's .zip file
0
It need to be debuged now done!
0
Now there is another question
0
How will make it like variable has text "Hellow World"
I want to do is in first frame a new variable as a will do
A = hellow
In second frame it's
A = wolrd