1.JavaScript定义函数时需要使用function关键字修饰
2.同一个js文件中的方法,后出现的方法会覆盖之前的方法如下代码输出2\n2,也就是说在开始执行文件前,第二个方法已经覆盖了第一个方法。
<script>
	function my_func(){
		document.write(1);
	}
my_func()
document.write("<br>");
	function my_func(){
		document.write(2);
	}
	my_func()
</script>
3.JavaScript中我们将鼠标或者热键的动作称之为事件,由鼠标或者热键引起的一些列程序动作称之为事件驱动,对时间进行处理的程序或者函数我们称之为事件处理程序
4.JavaScript事件参考手册(http://www.w3school.com.cn/jsref/jsref_events.asp)
5.JavaScript的所有数据都可以被视为对象,而每个对象都有其属性和方法。对象的属性是反映对象某些特定的性质的,对象的方法能对该对象做一些事情。
6.JavaScript创建对象的方式:
  1.通过new Object()来创建
	student = new Object();  // 创建对象“student”
	student.name = "Tom";   // 对象属性 名字
	student.age  = "19";    // 对象属性 年龄
	student.study =function() {   // 对象方法 学习
	    alert("studying");
	};
	student.eat =function() {     // 对象方法 吃
	    alert("eating");
	};
	比较区别于java等其他语言的创建,可以看到,JavaScript对象的创建十分灵活,所有的属性和方法可以在对象实例化以后追加
  2.
  	var student = {};
  	student.name = "Tom";
  3.
    var student = {
    	name:"Tom";
    	age:"19";
    }
  4.通过function关键字创建
	function student(name,age) {
		this.name = name;
		this.age = age;
		this.study = function() {
		    alert("studying");
		};
		this.eat = function() {
		    alert("eating");
		}
	}
	这里可以看出,JavaScript对于对象的创建和方法使用的是相通的关键字,其实例化方式如下
	var student1 = new student(‘Tom‘,‘19‘);
	var student2 = new student(‘Jack‘,‘20‘);
  5.其方法的或属性的调用也是通过类似于java的点的方式实现
  	还可以使用with关键字实现方法属性的调用
  		with(student1) {
			var x = name;
			var y= age;
			study();
			eat();
		}
  6.常用内置对象:以上三个类所包含的方法
  String(http://www.w3school.com.cn/jsref/jsref_obj_string.asp)
  Math(http://www.w3school.com.cn/jsref/jsref_obj_math.asp)
  Array(http://www.w3school.com.cn/jsref/jsref_obj_array.asp)
