changing html items with javascript | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 5

changing html items with javascript

I am trying to add html to my page with javascript. It works but it removes my html. If you are able I would appreciate the help. https://code.sololearn.com/WSpSD9CfSBmY/?ref=app

17th Aug 2017, 5:11 PM
Manual
Manual - avatar
1 ответ
+ 2
Have you tried adjusting elements of importance, by targetting them specifically? CSS allows you to tag the... tags, to reach them externally. An unintended yet awesome property to use. For your "member of party level up" object, attach a "id = ' ' " to the end, fill in the blank - so on so forth. When dealing with the JavaScript, use "var lvlUpTxt = document.getElementById( ' id name here ' )". Then refer to lvlUpTxt and edit the text attribute after. "lvlUpTxt.text = ' Party Member Levelled Up! ' " You may edit as you wish; "lvlUpTxt" is an arbitrary variable, you may use your own name for it.
17th Aug 2017, 5:23 PM
ghostwalker13
ghostwalker13 - avatar