读《java语言精粹》写的javascript程序
function f2c(){ var entity={quot:'"',lt:'<',gt:'>'}; return function(){ return this.replace(/&([^&;]+);/g,function($0,$1){ return entity[$1]; }); }}String.prototype.deenty=f2c();var str='<">'.deenty();alert(str);