Seven JavaScript Things I Wish I Knew Much Earlier In My Career

I’ve been writing JavaScript code for much longer than I care to remember. I am very excited about the language’s recent success; it’s good to be a part of that success story. I’ve written dozens of articles, book chapters and one full book on the matter, and yet I keep finding new things. Here are some of the “aha!” moments I’ve had in the past, which you can try out rather than waiting for them to come to you by chance. [Offtopic: by the way, did you know that there is a Smashing eBook Series? Book #1 is Professional Web Design, 242 pages for just $9,90.] Shortcut Notations One of the things I love most about JavaScript now is shortcut notations to generate objects and arrays. So, in the past when we wanted to create an object, we wrote: var car = new Object(); car.colour = 'red'; car.wheels = 4; car.hubcaps = 'spinning'; car.age = 4; The same can be achieved with: var car = { colour:'red', wheels:4, hubcaps:'spinning', age:4 } Much shorter, and you don’t need to repeat the name of the object. Right now, car is fine, but what happens when you use invalidUserInS

Published at 3 months ago

又一个Javascript试验田

以前本站发布过一篇《哥是玩程序的》文章向大家展示了用Javascript干的些怪异的事。看来,这样的人并不在少数,这不

Published at 4 months ago

22个所见即所得在线 Web 编辑器

我们曾介绍过 10 个基于 JavaScript 的 WYSIWYG(所见即所得) 编辑器,这些 Web 编

Published at 6 months ago

50 Brilliant CSS3/JavaScript Coding Techniques

CSS3 is coming. Although the browser support of CSS 3 is st

Published at 6 months ago

跨域Iframe高度自适应

在CSS Trick上面看到了一篇讲跨域Iframe调整的文章,DEMO在这里。要做到跨域Iframe高度自适应,需要可以

Published at 6 months ago

Javascript For Designers: Getting on Your Feet Fast

Web designers are a special breed – we’re one of a small grou

Published at 6 months ago

用javascript悬停效果改善你的在线商店的12种方法

我不得不承认在网页设计中我是一个钟情于“hover”或者“mouseover”功能(即悬停效果)的狂热分子。任何一个点

Published at 6 months ago

12种不宜使用的Javascript语法

这几天,我在读《Javascript语言精粹》。 这本书很薄,100多页,正好假日里翻翻。 该书的作者是

Published at 6 months ago

前端工程师常用工具

虽然有一段时间不做前端工程师,但还是免不了做前端的思维,碰到了很好的前端实用工具帖还是忍不住转了过来。这个帖子被转了好

Published at 6 months ago

使用Google Ajax API的好处

Google Ajax API是Google提供的一套常用javascript库,其中不仅包含了jQuery、YUI等

Published at 8 months ago
1 - 10 of 10 First | < Prev | Next > | Last