javascript

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript相关的知识,希望对你有一定的参考价值。

一个制作 游戏页面的 前端 工作者 应该 主要掌握 javascript 的哪部分内容,能即时应对 工作中 要涉及到的交互效果,应该怎么学习javascript.

1 基本语法 dom bom event 最好懂css
2 熟悉各种浏览器的特性 解决好兼容问题
3 掌握一种框架 例如jQuery 框架中就可以帮你解决很多浏览器的兼容问题.
4 有一个好脾气,但是该说话的时候要说话.做后台比如java那些人虽然技术不怎么样,但是有的还挺拿人,本来是他们出错了,非说是你前端做的不好,要及时跟他们沟通,
参考技术A DOM DOM
其它的,css,XML肯定少不了要懂的。
参考技术B 看一下 《疯狂Ajax》这本书挺不错的。或者学习一些基础

javascript JavaScript isset()等效: - JavaScript

// I generally use the typeof operator:

if (typeof obj.foo !== 'undefined') {
  // your code here
}
// It will return "undefined" either if the property doesn't exist or its value is undefined.


// There are other ways to figure out if a property exists on an object, like the hasOwnProperty method:

if (obj.hasOwnProperty('foo')) {
  // your code here
}

// And the in operator:

if ('foo' in obj) {
  // your code here
}

// The difference between the last two is that the hasOwnProperty method will check if 
// the property exist physically on the object (the property is not inherited).

// The in operator will check on all the properties reachable up in the prototype chain, e.g.:

var obj = { foo: 'bar'};

obj.hasOwnProperty('foo'); // true
obj.hasOwnProperty('toString'); // false
'toString' in obj; // true

// As you can see, hasOwnProperty returns false and the in operator returns true when checking the toString 
// method, this method is defined up in the prototype chain, because obj inherits form Object.prototype.

以上是关于javascript的主要内容,如果未能解决你的问题,请参考以下文章

javascriptjavascript常用函数大全

javascriptJavaScript数组常用方法

javascriptjavascript设计模式之工厂模式

JavaScriptJavascript闭包

JavaScriptJavascript闭包

JavaScriptJavaScript中的时间函数