码迷,mamicode.com
首页 >  
搜索关键字:document    ( 20024个结果
js控制键盘按键(回车、空格)
<script type="text/javascript"> $(function(){ $(document).keypress(function (e) { if (e.keyCode == 13) //...........code....... }) }); </script> <scri ...
分类:Web程序   时间:2017-01-05 10:04:25    阅读次数:281
call和apply求最大和最小值
可以换成this document.write(Math.max.apply(this, arr));//677 document.write("<br/>")document.write(Math.max.apply(Math, arr));//677 document.write(Math.ma ...
分类:移动开发   时间:2017-01-05 09:05:08    阅读次数:210
多个div同时居中的写法
多个div在某个div的中间,他们个数不一定但是需要在那个父级div中显示(和margin:0 auto一样的效果) <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Document</title> <style ...
分类:其他好文   时间:2017-01-05 00:52:02    阅读次数:198
HostOnly Cookie和HttpOnly Cookie
怎么使用Cookie? 通常我们有两种方式给浏览器设置或获取Cookie,分别是HTTP Response Headers中的Set-Cookie Header和HTTP Request Headers中的Cookie Header,以及通过JavaScript对document.cookie进行赋 ...
分类:Web程序   时间:2017-01-04 18:37:10    阅读次数:1262
1.3 jQuery基础
使用jQuery需要引用jQuery文件(页面引用多个js文件时jQuery在最前面) <script src="jquery-1.11.2.min.js"></script> “$”符号是代表选择器 <script type="text/javascript"> $(document).ready ...
分类:Web程序   时间:2017-01-04 11:03:48    阅读次数:208
js判断数组
1.constructor 在W3C定义中的定义:constructor 属性返回对创建此对象的数组函数的引用 就是返回对象相对应的构造函数。从定义上来说跟instanceof不太一致,但效果都是一样的 如: (a instanceof Array) //a是否Array的实例?true or fa ...
分类:编程语言   时间:2017-01-04 10:47:38    阅读次数:228
基于H5的微信支付开发详解
这次总结一下用户在微信内打开网页时,可以调用微信支付完成下单功能的模块开发,也就是在微信内的H5页面通过jsApi接口实现支付功能。当然了,微信官网上的微信支付开发文档也讲解的很详细,并且有实现代码可供参考,有的朋友直接看文档就可以自己实现此支付接口的开发了。 一、前言 为何我还写一篇微信支付接口的 ...
分类:微信   时间:2017-01-04 00:08:06    阅读次数:350
设计图片反复闪,点击后停止(设计定时器)
<!doctype html><html lang="en"><head> <meta charset="UTF-8" /> <title>Document</title></head><style> div{ width: 200px; height: 200px; background-colo ...
分类:其他好文   时间:2017-01-04 00:05:23    阅读次数:207
窗口尺寸,文档高,元素宽高的获取方式
一.元素宽高: window.onload = function() { var oDiv = document.getElementById('div1'); /* width height style.width : 样式宽 clientWidth : 可视区宽 offsetWidth : 占位 ...
分类:其他好文   时间:2017-01-03 22:17:59    阅读次数:192
一个简单移动页面ionic打包成app
先贴JS代码好了,缓动和调整透明度的功能,最后用ionic打包成应用就可以 window.onload=function(){ search(); move(); calc();}function search(){ var search = document.querySelector(".hw_ ...
分类:移动开发   时间:2017-01-03 22:13:15    阅读次数:626
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!