替换换行符:
title = title.replace(/[\r\n/]/g,‘‘).replace(/[\n]/g,‘‘).replace(/[\r\n/]/g,‘‘).replace(/[\n]/g,‘‘);
查找字符串:
a="hello string"; a.indexOf("string");
js笔记
原文:http://www.cnblogs.com/ccdc/p/4033624.html