js substring从右边获取指定长度字符串(示例代码)

时间:2013-12-23    点击:111   
如下所示:
复制代码 代码如下:

 /*

   Get the rightmost substring, of the specified length,

   from a String object.

*/ 

String.prototype.right = function (length_) 



        var _from = this.length - length_; 

        if (_from < 0) _from = 0; 

        return this.substring(this.length - length_, this.length); 

}; 
让jQuery与其他JavaScript库并存避免冲突的方法
js写的评论分页(还不错)
用js来刷新当前页面保留参数的具体实现
jquery插件jTimer(jquery定时器)使用方法
jquery实现图片翻页效果
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved