- 博客(9)
- 资源 (1)
- 收藏
- 关注
原创 用js实现翻书的动画效果
效果图(哈哈哈哈,博主的恶趣味请无视) css部分 <style> .y{ background-color: cornflowerblue; height: 200px; width: 300px; display: flex; position: relative; left: 230px; top: 50px; ...
2019-09-07 11:45:57
2456
3
原创 uniapp离线打包后plus.runtime.openFile或uni.openDocument失效
uniapp离线打包后plus.runtime.openFile或uni.openDocument失效 最近遇到了个深坑,就是模拟器下载word后可以吊起手机的wps在线浏览,但是离线打包后,该api失效。 找了很多文档,试了很多方法,最后发现是离线打包外壳缺少权限 解决方案 在安卓的最外层打包外壳AndroidManifest.xml添加该代码: 图片: 复制代码 xx.xxx.xxx改为自己的包名 // An highlighted block <provider android:name="
2022-05-10 15:02:44
2949
原创 ajax的封装
ajax的封装 // 1.处理默认参数 var {type,url,success,error,data,timeout} = options; type = type || "get"; data = data || {}; timeout = timeout || 2000; // 2.解析要发送的数据 var str = ""; ...
2019-10-20 18:11:08
215
原创 jquery实现三级导航
效果如图 仅供参考 老规矩 ,先是css部分 ul,li{ list-style: none; padding: 0; cursor: pointer; } .yi{ position: absolute; left: 50px; } .yi>li{ position: relative; }...
2019-10-12 20:59:56
735
原创 Es6新增的Class及class继承
class构造函数写法 若用Es6新增的class来构造函数,则需要考虑兼容问题,要是用高版本的浏览器。 那么如何用class来面对对象构造函数呢,下来来个小例子 下面这是工厂模式的面对对象构造函数写法 function Fn(){ this.name=“have a try”; } Fn.prototype.show=function(){}; var f=new Fn(); console.l...
2019-09-21 16:40:36
648
1
原创 随机点名(数组)
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style> #box{ background-color: greenyellow; height: 80px; width: 1...
2019-09-15 19:58:48
667
原创 元素的拖拽效果(鼠标移动加监听事件)
首先创建一个盒子 .box{ width:100px;height:100px; background: red; position: absolute;left:0;top:0; } <body> <div class="box"></div> </body...
2019-09-01 20:55:00
2206
原创 js随机生成4位验证码(包括数字英文大小写)
html部分 验证码<input type="text" value="" id="txt" /> <input type="button" value="刷新" id="btn" /> <input type="button" value="清除" id="btn1" /> 如图 js部分 这里我把函数写在了一起 function random(a...
2019-08-24 17:48:28
3597
原创 js如何屏蔽敏感词
js如何屏蔽敏感词 在js中,如何将用户输入的敏感词自动屏蔽呢。这很简单,只需要用到字符串的replace()函数即可。 先在html中设置两个文本框和一个按钮 <input type="text" value="" id="txt1" placeholder="请文明用语" /> <input type="button" value="发送" id="btn" /> &l...
2019-08-24 17:25:33
2823
1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅