js startWith
2015-06-25 10:47
621 查看
String.prototype.startWith=function(s){ if(s==null||s==""||this.length==0||s.length>this.length) return false; if(this.substr(0,s.length)==s) return true; else return false; return true; }
相关文章推荐
- JS快速获取图片宽高的方法
- javascript控制台详解
- 在js里的路径问题
- extjs-->form
- js自总结01
- Ajax中解析Json的两种方法对比分析
- 深入分析js中的constructor 和prototype
- 新手快速学习JavaScript免费教程资源汇总
- (摘录)javascript笔试题
- Arcgis for Javascript之featureLayer图和属性的互操作
- js如何实现继承
- js 替换空格
- JS请求JSON格式的数据及JSON对象
- JavaScript中字符串(string)转json的2种方法
- adblockTester通过js检测用户浏览器是否安装了AdBlock
- 7 个基本的 JS 函数
- javascript使用技巧总结,不断更新...
- 不得不说的JavaScript异步加载
- JSP中使用Taglib
- 15款加速 Web 开发的 JavaScript 框架