- JS获取地址栏参数
- getQueryVariable(variable){varquery=window.location.search.substring(1);varvars=query.split("&a...
- getElementsByClassName获取的为元素数组
- getElementById获取的是单个的元素,可以直接跟.style.样式getElementsByClassName获取的是一个元素数组,可以用循环或者加下标才能接.style.样式documen...
- JS时间长转换为日期格式
- timestampToTime:function(timestamp){vardate=newDate(timestamp*1000);varY=date.getFullYear()+'-&#...
- 鼠标滚轮滚动事件
- mousewheel事件DOMMouseScroll事件<div@mousewhell="scroll"@DOMMouseScroll="scroll"&...
- 地址转二维码JS外联地址
- <scripttype="text/javascript"src="https://static.runoob.com/assets/qrcode/qrcode.m...
- JS判断当前打开的是手机还是浏览器
- 方法一:window.location.href=/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)?"htt...
- 禁止别人查看网页源代码
- window.onload=function(){//屏蔽键盘事件document.onkeydown=function(){vare=window.event||arguments[0];if(e....
- fetch的用法
- 1.GET请求fetch('/index.php/Product/Index/getRoleByPano?id='+id,{method:'get'}).then(re...
栏目分类全部>