在js中写html

2018-10-01  本文已影响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));

上一篇 下一篇

猜你喜欢

热点阅读