今天在做项目时,遇到一个问题,checkbox选中后会把选中的值赋值给一个变量,根据这个变量的值来控制页面上一个按钮是否显示。
var temp = "";
for(){
var bool = "";
//给temp赋值
if(temp == '31'){
bool += "false";
}
}
if(bool.indexOf("false") >= 0...
分类:
其他好文 时间:
2014-09-16 19:00:01
阅读次数:
149
js 判断字符串是否包含某字符串,String对象中查找子字符,indexOf
var test= "aa";
if(test.indexOf("a") > 0 )
{
}
indexOf用法:
返回 String 对象内第一次出现子字符串的字符位置。
strObj.indexOf(subString[, startIndex])
...
分类:
Web程序 时间:
2014-09-16 17:25:00
阅读次数:
216
自我总结,有什么需要改正弥补的地方,请指出,感激不尽!本次总结了indexof的用法,BigDecimal的乘法、移位运算,Decimal的格式化输出,字符串替换上代码:测试类 Test.javapackage com.core;import java.io.IOException;import j...
分类:
编程语言 时间:
2014-09-16 17:20:50
阅读次数:
203
微信浏览器是不支持打开App Store 页面的。比如你页面写 id867985717″>下载取号啦 ,在微信浏览器点击链接是没有反应的,但是如果是其他的链接地址,比如百度那就没有问题。function viewSource() {
var redirectUrl = sourceurl.indexOf('://') < 0 ? 'http://' + sourceurl : sourceurl;...
分类:
微信 时间:
2014-09-16 14:20:10
阅读次数:
319
$("#addfav").click(function() { var ua = navigator.userAgent.toLowerCase(), url =location.href, sitename =document.title; if(ua.indexOf("msi...
分类:
其他好文 时间:
2014-09-15 19:29:39
阅读次数:
141
本篇文章主要是对js中indexof的用法进行了详细的介绍,需要的朋友可以过来参考下,希望对大家有所帮助 String.IndexOf 方法 (Char, [startIndex], [count]) 报告指定字符在此实例中的第一个匹配项的索引。搜索从指...
分类:
Web程序 时间:
2014-09-12 12:07:33
阅读次数:
212
function testB () { // body...var isOpera = !!window.opera ||!!window.opr|| navigator.userAgent.indexOf(' OPR/') >= 0; // Opera 8.0+ (UA detecti...
分类:
Web程序 时间:
2014-09-12 11:48:13
阅读次数:
253
目前问题:运行结果:QQ截图20140911171128.png(14.68 K)2014-9-12 11:02:28CODE 为王,直接奉上。$(document).ajaxSend(function (e, xhr, o) {// 截获RunReport请求if (o.url.indexOf('...
分类:
其他好文 时间:
2014-09-12 11:47:13
阅读次数:
218
今天遇到截取字符串的问题,在网上查了IndexOf、LastIndexOf、Substring这三种截取字符串的使用总结如下: String.IndexOf String.IndexOf 方法 (Char, Int32, Int32)报告指定字符在此实例中的第一个匹配项的索引。搜索从指定字符位置开始...
分类:
其他好文 时间:
2014-09-10 15:34:40
阅读次数:
217
需要针对IE浏览器对文件名进行一下操作:HttpContext.Current.Request.ServerVariables["http_user_agent"].IndexOf("firefox")==-1 fileName=HttpUtility.UrlEncode(fileName,Sys....
分类:
Web程序 时间:
2014-09-10 14:07:20
阅读次数:
159