coding level 1 can not find the "textarea" element please help :(

Alphabetize

BobHackMe
6 years ago

0

Hi,can not find the “textarea” element please help :(

this is the code :

var text= document.getElementsByName(“ -

can not find the "textarea” element
- “)[0].innerHTML.split(”\n").sort().join(“,”);document.getElementsByName(“answer”)[0].innerHTML = text;

Any suggestion how to find the element ? , thanks.

2replies
2voices
212views
L00PeR
6 years ago

0

Thats because the function:
document.getElementsByName()
Is obsoleted, now, you must use:
document.getElementsByTagName()

BobHackMe
6 years ago | edited 6 years ago

0

Thanks for your replay L00PeR.

Discussion thread has been locked. You can no longer add new posts.
1 of 3

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss