- 浏览: 64433 次
- 性别:
- 来自: 北京
-
最新评论
-
hanazawakana:
倒数第二个例子,关于为什么B没有继承A,我觉得也可以这样理解, ...
js call和apply -
tk1012:
good
js call和apply -
njl_041x:
不知道什么情况下会用到???
烦请楼主给举个简单的实用的小例子 ...
js constructor属性 -
liuguofeng:
楼主写的好,受教了,挺你
js constructor属性 -
晨曦的朝阳:
写得挺好。
js constructor属性
文章列表
constructor属性始终指向创建当前对象的构造函数.
如果对 constructor的指向不是很理解,请先看
http://cxy020.iteye.com/blog/1028100
//兼容ie浏览器测试
var console = console || {};
console.log = console.log || function(a){
alert(a);
}
//类
functi ...
或运算(||),与运算(&&)
- 博客分类:
- Javascript
&& 和 || 运算符
||,或运算
&&,与运算
或运算,指的是 如果 条件为真 则返回 本身,如果为假 则返回 默认值
var a = true || 1;
a = true;
var a = false || 1;
a = 1;
如何判断条件是否为真呢,可以通过Boolean()判定;
Boolean(undefined);//false;
//形象一些
var a = {};
Boolean(a.b);//false;
Boolean(null);//false;
Boolean("");//fa ...
touchmove获取clientX
- 博客分类:
- 随笔
$("body").bind('touchmove', function(e){
//stops normal scrolling with touch
e.preventDefault();
console.log(event.touches[0].pageX);
console.log(event.touches[0].clientX);
})
You are right, seems like a bug. You could hack around it by offsetting the scroll of the page (event.ta ...
js请求(2)
- 博客分类:
- javascript学习
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>js请求</title>
<script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
</head>
...
js请求(1)
- 博客分类:
- javascript学习
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>js请求</title>
<script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
</head>
...
js事件(5)
- 博客分类:
- javascript学习
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>js事件封装</title>
<script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
</head> ...
js事件(4)
- 博客分类:
- javascript学习
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>jQuery事件</title>
<script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
</head& ...
js事件(3)
- 博客分类:
- javascript学习
1<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>JS事件</title>
<script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
<style> ...
js事件(2)
- 博客分类:
- javascript学习
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>JS事件</title>
<script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
<style> ...
js事件(1)
- 博客分类:
- javascript学习
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>JS事件</title>
<script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
<style ...
html介绍(5)
- 博客分类:
- javascript学习
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>HTML动态更新</title>
<script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
& ...
html介绍(4)
- 博客分类:
- javascript学习
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>CSS</title>
<script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
<style>
...
html介绍(3)
- 博客分类:
- javascript学习
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>HTML标签</title>
<script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
</head> ...
html介绍(2)
- 博客分类:
- javascript学习
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>HTML标签</title>
<script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
</head> ...
html介绍(1)
- 博客分类:
- javascript学习
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>HTML标签</title>
</head>
<body>
<!-- 输入框 -->
<input id="mytxt" type="text" /><br />
<!-- 密码框 -- ...