String.prototype.Trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
String.prototype.LTrim = function()
{
return this.replace(/(^\s*)/g, "");
}
String.prototype.Rtrim = function()
{
return this.replace(/(\s*$)/g, "");
}
資料來源:http://www.uhostdev.com/big5/html/a_WebTech/JavaScript/2010/0211/586.html
2010年7月4日 星期日
訂閱:
文章 (Atom)