String url=" ";if(!weather_pic.equals("")) { if(weather_pic.indexOf("src")>-1) { url=url.substring(url.indexOf("src")+5,url.indexOf("png")+3); } }截取之....
分类:
编程语言 时间:
2015-07-17 00:02:29
阅读次数:
315
常用jQuery代码分享 1.查看浏览器信息 navigator.userAgent 检索浏览器信息包括哪些字符 例如: if?(navigator.userAgent.toLowerCase().indexOf("htc")?>=?0)?{
????????$("#GuanKa?.page_content...
分类:
Web程序 时间:
2015-07-15 09:36:33
阅读次数:
169
paste fromhttp://www.cnblogs.com/xinyu1020/articles/1785858.htmlString.IndexOfString.IndexOf 方法 (Char, Int32, Int32)报告指定字符在此实例中的第一个匹配项的索引。搜索从指定字符位置开始,...
分类:
其他好文 时间:
2015-07-14 19:51:14
阅读次数:
91
public class IpUtil {
/**
* ip地址转换成16进制long
* @param ipString
* @return
*/
public static Long ipToLong(String ipString) {
Long[] ip = new Long[4];
int pos1= ipString.indexOf(".");
int ...
分类:
其他好文 时间:
2015-07-13 16:03:44
阅读次数:
137
1 function getOs(url,title) { 2 3 var OsObject = ""; 4 5 if(navigator.userAgent.indexOf("MSIE")>0) { 6 7 ...
分类:
Web程序 时间:
2015-07-13 15:42:12
阅读次数:
126
数组方法集Angela.array = { //# 数组方法 // index, 返回位置! 不存在则返回 -1; index: function (t, arr) { //# 返回当前值所在数组的位置 if (arr.indexOf) { re...
分类:
Web程序 时间:
2015-07-11 10:25:57
阅读次数:
109
//获取url中"?"符后的字串function getParamByUrl(url) { var theRequest = new Object(); var index = url.indexOf("?"); if (index != -1) { var str = url...
分类:
Web程序 时间:
2015-07-09 17:46:20
阅读次数:
129
PHP ECMAScript 长度 strlen($str) str.length 查找类 strpos($str,需要查找的字符) 获取字符首次出现的位置 str.indexOf(需要查找的字符,[起始位置]) strrpos($str,需要查找的字符) 获取字符最后出现的位置 str.last....
分类:
Web程序 时间:
2015-07-08 12:37:02
阅读次数:
125
function isFF(){ //火狐 return window.navigator.userAgent.toLowerCase().indexOf("firefox") >=1 } function isIE(){ //IE return win...
分类:
其他好文 时间:
2015-07-08 12:28:54
阅读次数:
105
一、常用方法1public char charAt(int index) 返回字符串中第index个字符public int length() 返回字符串的长度public int indexOf(String str) 返回字符串中出现str的第一个位置public int indexOf(Str...
分类:
其他好文 时间:
2015-07-07 00:54:28
阅读次数:
101