📜  javascript 模板文字 html - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:19.307000             🧑  作者: Mango

代码示例1
// Create our object
const person = {
    name: 'TopCoder2021',
    job: 'Software Developer,
    city: 'Los Angeles',
    bio: 'Tony is a really cool guy that loves to code!'
}

// And then create our markup:
const markup = `
 

${person.name}

${person.city}

${person.bio}

`; document.body.innerHTML = markup