htmlEntities是php中将html实体化的函数,JavaScript的没有现成的,故找了一个自写的。代码如下:

function htmlEntities(str) {
return String(str).replace(/&/g, &apo[......]

阅读全文