1:javascript类型:
        6种:undefined null number string boolean function

        首字母大写才是类型: Undefined Number Object Function Null***

        第7种        object

2:typeof运算符

    alert(typeof  a )   // undefined

    if(typeof a =="undefined"){}  //true

   typeof返回的是字符串不是类型 ,一定要记住,所以上面的if语句中的引号是不能不写的的。

3:命名法:  应该使用 匈牙利命名法命名变量  驼峰命名法命名函数

4:javascript  this指针 prototype使用

 

 
  
  1. $(function(){ 
  2.     alert("aaaaaaaaaaa"); 
  3.      function sayHi(){ 
  4.         alert("hello"); 
  5.         return this
  6.     } 
  7.     function sayHi2(){ 
  8.         alert("hello2"); 
  9.         return this
  10.     } 
  11.     function Person(){ 
  12.          
  13.     } 
  14.     Person.prototype.sayHello=sayHi; 
  15.     Person.prototype.sayHello2=sayHi2; 
  16.     var marry=new Person(); 
  17.     marry.sayHello().sayHello2();  
  18. }); 

 5:javascript 编码 解码

这是javascript的函数.
encodeURI("url地址")//编码
decodeURI("url地址")//解码