+ 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
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.