- 博客(3)
- 收藏
- 关注
原创 计算字符串出现的次数
方法一:String str = “北京市人民政府和北京市政协”;// 定义一个子串String s = “北京”;// 统计次数int count = 0;while (true) {// 返回第一次出现子串的索引int index = str.indexOf(s);if (index!= -1) {str = str.substring(index + s.length()...
2019-03-28 11:54:59 3310 1
原创 全选,反选,全不选
$(function(){//全选$("#quanxuan").click(function(){$(":checkbox").each(function(){$(this).attr(“checked”,true);})})//全不选$("#quanbuxuan").click(function(){$(":checkbox").each(function(){$(this)...
2019-03-25 17:05:14 111
原创 **#批量删除**
function piliang(){ var ids = ""; //先获取到所有选中的复选框 $(":checkbox:checked").each(function(){ ids += ","+this.value; // ,1,2,3 拼接 }) ids = ids.substring(1); //1,2,3 截取 alert(...
2019-03-25 16:59:20 134
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人