- 博客(2)
- 资源 (2)
- 收藏
- 关注
转载 JavaScript中如何trim()
在JavaScript中我们需要用到trim的地方很多,但是JavaScript又没有独立的trim函数或者方法可以使用,所以我们需要自己写个trim函数来实现我们的目的。 方案一: 以原型方式调用,即obj.trim()形式,此方式简单且使用方面广泛,定义方式如下:/*** 删除左右两端的空格*/String.prototype.trim=function(){
2009-03-09 13:01:00 750
转载 40 Useful JavaScript Libraries
Popular JavaScript libraries such as jQuery, MooTools, Prototype, Dojo and YUI can be great for accomplishing common JavaScript tasks. These libraries provide many functions, whether the matter is rel
2009-03-09 10:46:00 843
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人