저는이 프로토 타입을 시험하고 있습니다. 프로토 타입 안에 더 많은 것들을 추가 할 것입니다. 내가 잘못하고있는 것은 무엇입니까?프로토 타입 및 substr
말했다되고 그건String.prototype.replaceme = function() {
return this.replace("<", "<").replace(">", ">");
}
, decode HTML entities 아마 더 좋은 방법이 있습니다 :
String.prototype.replaceme = function(){
var toreplace;
toreplace = this.substr("<","<")
toreplace += this.substr(">",">");
return toreplace;
}
무엇을하려고합니까? – bfavaretto