document.getElementById innerHTML not displaying

前端 未结 3 1282
说谎
说谎 2021-01-07 09:36

This should be a pretty easy thing to do, but it\'s not returning anything. The function love() should kick off, getting a simple number prompt, and spitting out a list of a

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-07 10:23

    Your function just wraps elements inside another. There is no text inside or outside these elements to dipslay. Try inserting some random text before closing tags to see the result. Btw, the elements are successfully placed in the p tag.

提交回复
热议问题