热门 旅行的足迹
时间:2018-3-15
分类:
热度:2201
热门 如何js屏蔽所有出错信息?
时间:2018-3-15
分类:
热度:2166
var killErrors = function(value) {
return true
};
window.onerror = null;
window.onerror = killErrors;
虽然没什么用,但是上线后不想控制台输出内容
热门 layui使用在form的search中搜索去除大小写限制?
时间:2018-3-14
分类:
热度:3150
热门 chrome浏览器有缓存时候,自动填充会有淡黄色背景色,如何解决?
情景一:input文本框是纯色背景的 解决办法: input:-webkit-autofill { -webkit-box-shadow: 0 0 0px 1000px white inset; -webkit-text-fill-color: #333; } 情景二:input文本框是使用图片背景的 解决办法: if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) { var _interval = window.setInterval(function () { v...热门 夜色伴着夜风缓缓降临
时间:2018-3-13
分类:
热度:2962
热门 js输出内容到新网页(预览)
时间:2018-3-1
分类:
热度:2374
myWindow=window.open('','','width=200,height=100')
myWindow.document.write("This is 'myWindow'")
myWindow.focus()
myWindow.opener.document.write("This is the parent window")
热门 JS合并数组的几种方法及优劣比较
时间:2018-3-1
分类:
热度:2067
本文属于JavaScript的基础技能. 我们将学习结合/合并两个JS数组的各种常用方法,并比较各种方法的优缺点.
我们先来看看具体的场景:
代码如下:
var q = [ 5, 5, 1, 9, 9, 6, 4, 5, 8];
var b = [ "tie", "mao", "csdn", "ren", "fu", "fei" ];
很明显,数组 q 和 b 简单拼接的结果是:
代码如下:
[
5, 5, 1, 9, 9, 6, 4, 5, 8,
"tie", "m...
热门 css设置随着浏览器放大缩小而背景不变
时间:2018-2-27
分类:
热度:2620
热门 时间戳互相转换工具
时间:2018-2-27
分类:
热度:2292
var no=new Date().getTime();
console.log(no);
Date.prototype.format = function(format) {
var date = {
"M+": this.getMonth() + 1,
"d+": this.getDate(),
"h+": this.getHours(),
"m+": this.getMinutes(),
"s+": this.ge...