、、、 npm install itheima-tools-hx 、、、
、、、js const itheima=require('itheima-tools-hx') 、、、
、、、js
const dtStr = dt.dateFormat(new Date())
console.log(dtStr); 、、、
、、、js
const htmlStr = '
'const str = dt.HTMLEscape(htmlStr)
console.log(str); 、、、
、、、js
const htmlStr2 = '<h1 title="abc">这是h1标签<span>123 </span></h1>'
const str2 = dt.htmlUnEscape(htmlStr2) console.log(str2); 、、、
ISC