-2
Do I need a line break after an appendchild or would it be after input? I’m a beginner in JS and I’m a little lost on how to make this line break.
var inp1 = document.createElement('input')
var inp1 = document.createElement('input')
var text1 = document.createTextNode('Digite o primeiro numero: ')
var text2 = document.createTextNode('Digite o segundo numero: ')
div.appendChild(text1)
div.appendChild(inp1) //quebra de linha no final do input
div.appendChild(text2)
var container = document.querySelector('#div')
container.appendChild(div)
Thank you very much friend, very good to have advice like this at the beginning! I will follow your advice! I created the 3 div elements and gave right, thank you very much!
– Janio Albuquerque
@Janioalbuquerque Note that the solution to your problem is not even related to JS, it is a matter of HTML. CSS could also be used if necessary.
– bfavaretto