ES6中提供了模版字符串,用`(反引号)标识,用${variable}将变量括起来

 $("#result").append(`He is <b>${person.name}</b>and we wish to know his${person.age}.that is all`);

 

相关文章:

  • 2022-12-23
  • 2021-11-29
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
猜你喜欢
  • 2021-11-05
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案