你可能喜欢
-
js本地存储:localStorage
具体使用方式如下: ``` 1.localStorage - 没有时间限制的数据存储 var arr=[1,2,3]; localStorage.setItem("temp",arr); //存入 参数: 1.调用的值 2.所要存入的数据 console.log(localStorage.getItem("temp"));//输出
-
加载中效果
``` /* $('body').on('click', 'a', function(){ var href = $(this).attr('href'); if(!href || /^(javascript:)|#/.test(href)) return; window.location.href = href; loading(); return fa
-
css清除下拉框
css清除下拉框 下拉条 ::-webkit-scrollbar { width: 0px; height: 0px; background-color: rgba(240, 240, 240, 1); } ::-webkit-scrollbar-track { box-shadow: inset 0
-
JS函数返回值return
return 返回值:数字 字符串 布尔 函数 对象(元素 数组 json null) undefined 01:返回数字(number) ```javascript function fn1(){ return 100; } alert(fn1());//可以理解为 fn1() = 100; 函数名称加括号等于return出来的东西 ``` 02:返回字符串(string) ```jav
-
在线运行代码示例
运行
-
PHP提取字符串中的数字
PHP提取字符串中的数字,摘自网络。 第一种方法,使用正则表达式: function findNum($str=''){ $str=trim($str); if(empty($str)){return '';} $reg='/(\d{3}(\.\d+)?)/is';//匹配数字的正则表达式 preg_match_all($reg,$str,$result); if(
评论 0