js String擴展方法 'asdasdasd'.repalceA()"AsdAsdAsd" ...
(jQuery.fn.myMethod=function () { alert('myMethod'); })
(function ($) { $.fn.extend({ myMethod : function () { alert('myMethod'); } }) })(jQuery)
js String擴展方法
String.prototype.repalceA=function(){ return this.replace(/a/g,'A') }
'asdasdasd'.repalceA()
"AsdAsdAsd"