S
S
siteohio2020-04-25 11:21:45
JavaScript
siteohio, 2020-04-25 11:21:45

How to add template string to HTML?

Good day!
I would like to know how to add template string to HTML.
For example. Does not work.
<p>`${input.value}`</p>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hzzzzl, 2020-04-25
@siteohio

don't confuse html and js

document.querySelector('p')
  .textContent = `${input.value}`

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question