
前端
97小菜鸟
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
H5 app 子页面(webview)调用app 方法
父页面声明方法function goDetails(){ console.log(11111)}子页面中写法plus.webview.currentWebview().parent().evalJS("goDetails('"+id+"');");原创 2021-08-10 17:29:15 · 637 阅读 · 0 评论 -
es6模块化
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title></title> </head> <body> </body> <script type="module"> import * as m1 from './js/modejs.js' console.log(m1) </scri原创 2021-03-17 22:32:02 · 243 阅读 · 0 评论 -
es6 类声明和继承
class Phone{ //构造方法 constructor(brand,price){ this.brand = brand this.price = price } //对象里的方法 call(){ console.log('我能打电话') }}原创 2021-03-17 21:56:24 · 191 阅读 · 0 评论 -
html 列表页滚动后跳转,返回时停留在原来位置
$(function(){ window.onbeforeunload = function () { var scrollPos; if (typeof window.pageYOffset != 'undefined') { scrollPos = window.pageYOffset; } else if (typeof document.compatMode != 'undefined' &&...原创 2021-03-08 16:55:22 · 653 阅读 · 0 评论 -
移动端屏幕自适应js
function getRem() { var html = document.getElementsByTagName("html")[0]; /*获取标签元素<html>*/ var oWidth = document.body.clientWidth || document.documentElement.clientWidth; /*获取设备的宽度 ||后为兼容IE低版本写法*/ html.style.fontSize = oWidth / 3.75+ "px"; /*设置原创 2021-02-25 16:00:43 · 243 阅读 · 0 评论 -
vue 长按事件
var timeOutEvent=0;//定时器 // html<div @touchstart="gotouchstart" @touchmove="gotouchmove" @touchend="gotouchend"></div>//jsgotouchstart(){ let that = this; clearTimeout(timeOutEvent);//清除定时器 timeOutEvent = 0; timeOutEvent = se原创 2021-01-05 17:05:30 · 279 阅读 · 0 评论 -
MUI ajax 调用接口方法
mui.ajax(url, { data: { "requestJson": JSON.stringify(data) }, dataType: "json", contentType: 'application/json;charset=utf-8', //服务器返回json格式数据 type: 'POST', //HTTP请求类型 timeout: 10000, //超时时间设置为10秒; success: function(result,status,xhr) { var原创 2020-12-10 09:45:09 · 785 阅读 · 0 评论 -
Echarts 图表左右滑动功能
var mychart = echarts.init(document.getElementById('echarts1')); option = { color: ['#FED14A'], title:{ show:true, text: 'xxxx食堂', x:'center', padding: 10, textStyle: { //主标题文本样式{"fontSize": 18,"fontWeight": "bol原创 2020-11-24 11:12:56 · 7409 阅读 · 1 评论 -
Vue 中数组函数
Vue 中数组方法总结原创 2020-07-16 10:32:45 · 946 阅读 · 0 评论 -
markdown编辑器之editormd使用整合
editormd markdown 编辑器使用,展示markdown文本原创 2020-05-15 10:03:45 · 724 阅读 · 0 评论 -
Ajax 使用 FormData 请求传参(附件)
Ajax 使用 formData 传参,上传附件原创 2020-05-13 10:56:01 · 5283 阅读 · 0 评论 -
H5小技巧(三)HTML 图片压缩 imagecompress.js
使用 jq 插件 压缩图片 并设置为 base64 格式原创 2020-04-27 11:27:50 · 1653 阅读 · 0 评论 -
H5 移动端 加载框 、PC 图片点击预览
移动端 html 实现 加载提示框原创 2020-04-09 11:47:50 · 848 阅读 · 1 评论 -
H5小技巧(二)input file 选择图片预览
input file 类型上传图片获取图片大小以及图片路径原创 2020-03-27 14:09:02 · 790 阅读 · 0 评论 -
H5小技巧(一)(常用移动端点击事件整理、input 键盘遮挡问题,监听物理返回键)
常用移动端点击事件整理、input 键盘遮挡问题,监听物理返回键原创 2020-03-24 10:26:21 · 476 阅读 · 0 评论