美文网首页
在js中写html

在js中写html

作者: 战神七小姐 | 来源:发表于2018-10-01 09:15 被阅读0次

var fs = require("fs");

var css = `<style>

*{

    margin:0;

    padding:0;

    list-style:none;

    text-decoration:none;

}

div{

    width:130px;

    height:140px;

    margin:20px;

    text-align:center;

    line-height:140px;

    background:red;

}

</style>`;

var bodys = `<div>sdfg</div><div>sdfg</div><div>sdfg</div><div>sdfg</div>`;

var abc = css + bodys;

fs.writeFile("./color.html", abc, function(res) {

    console.log(res)

})

var arr = [1, 2345, 123, 1, 1, "1", null];

console.log(new Set(arr));

相关文章

网友评论

      本文标题:在js中写html

      本文链接:https://www.haomeiwen.com/subject/dcypoftx.html