<!DOCTYPE html> <html> <body> <h2>JavaScript 模板字面量</h2> <p>通过使用反引号,您可以在字符串中同时使用单引号和双引号:</p> <p id="demo"></p> <p>Internet Explorer 不支持模板字面量。</p> <script> let text = `He's often called "Johnny"`; document.getElementById("demo").innerHTML = text; </script> </body> </html>