帮解释一下这几个prototype是什么意思
String.prototype.noharmcode=   function   ()   { 
 			return   this 
 				.replace(/&/g,    "%26 ")				 
 				.replace(/\+/g,    "%2b "); 
 } 
 String.prototype.Trim   =   function() 
 {	 
             return   this.replace(/^\s*|\s*$/g, " "); 
 } 
 String.prototype.RTrim   =   function() 
 {	 
             return   this 
                         .replace(/^\s*|\s*$/g, " ") 
                         .replace(/ /g, " ") 
                         .replace(/ <p>  <\/p> /g, " "); 
 } 
 请帮一句一句解释一下,这代码是怎么看的,是什么意思?
------解决方案--------------------这个是不是那个prototype框架吧,看来你应该看看javascript以及正则表达式,先去上网查查   
 我也不是很清楚代码中具体的意思(%26,%2b)   
 大概意思就是定义了三个函数,实现了三种字符串的替换功能.
------解决方案--------------------在js中,prototype只是对象的一个属性
------解决方案--------------------我没接触过正则表达式,但刚刚查了一下,大概解释一下. 
 replace(/&/g,  "%26 ")//此处的意思是把一个字符串中的&替换为%26; 
 replace(/\+/g,  "%2b ")//这块是把+替换为%2b;   
 其中/g的意思是把这个要转换的字符串中所有出现的地方都要转换. 
 replace(/要替换的字符/g, "替换完的字符 ")
------解决方案--------------------原型! 
 String.prototype.noharmcode //为String对象添加一个noharmcode function   
 //示例: 
 String.prototype.Trim = function() 
 {//字符串去除首尾空格. 
 return this.replace(/^\s*|\s*$/g, " "); 
 }   
 alert( "  test   ".Trim());//it will alert  "test "
------解决方案--------------------这就是给String类添加了仨方法,noharmcode,Trim和Rtrim嘛. 
 顾名思义,第一个是将字符中一些特殊字符替换掉(类似于escape),后面的是去空格的. 
 /^\s*|\s*$/g 
 具体的查一下JS的帮助手册上正则的部分,这个的意思大概是所有以(多个)空格开头 或以(多个)空格结尾的字符串
------解决方案-------------------- <script type= "text/javascript ">  
 String.prototype.Trim = function() { 
     return this.replace(/^[ \s]+|[ \s]+$/g, " "); 
 }   
 String.prototype.RTrim = function() { 
     return this.replace(/(?:^[ \s]+|[ \s]+$| | <p>  <\/p> )/g, " "); 
 } 
 alert( "| " +  "    <p>  <\/p>   <p>  <\/p>     ".RTrim() +  "| "); 
  </script>
------解决方案--------------------String.prototype.noharmcode= function () { 
 return this 
 .replace(/&/g,  "%26 ") 
 .replace(/\+/g,  "%2b "); 
 }//这个方法是把字符串中的所有&用%26替换,+用%2b替换,调用方法 
 var s =  "adksfka&df& "; 
 s = s.noharmcode();   
 String.prototype.Trim = function() 
 { 
 return this.replace(/^\s*|\s*$/g, " "); 
 }//去掉字符串中的头尾空格   
 String.prototype.RTrim = function() 
 { 
 return this 
 .replace(/^\s*|\s*$/g, " ") 
 .replace(/ /g, " ") 
 .replace(/ <p>  <\/p> /g, " "); 
 }//去掉头尾空格,字符串中所有空格,所有的 <p>  </p> (指DW中的回车) 
------解决方案--------------------后两个调用方法类似。这是对JS中的String对象进行扩展