运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <h1>JavaScript Template Strings</h1> <p>With back-ticks, you can use both single and double quotes inside a string:</p> <p id="demo"></p> <p>Templates not supported in Internet Explorer.</p> <script> let text = `He's often called "Johnny"`; document.getElementById("demo").innerHTML = text; </script> </body> </html>