Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Taking_Your_Talent_to_the_Web.pdf
Скачиваний:
5
Добавлен:
11.05.2015
Размер:
9.91 Mб
Скачать

290 HOW: The Joy of JavaScript: Sounds Great, but I’m an Artist

We know what you’re saying. “Sounds great, but I’m, like, an artist. Do I

really have to learn this stuff?”

SOUNDS GREAT, BUT I’M AN ARTIST. DO I REALLY HAVE TO LEARN THIS STUFF?

The politically correct answer is, yes you do, because adding interactivity to your clients’ sites is part of what makes you a web designer. The gentle answer is, learning JavaScript is an iterative process: You can begin by cutting and pasting and gradually come to understand what you’re working with. The Richard Nixon Memorial answer is, not at first, and maybe never.

Not at first and maybe never is an answer because many working web designers get by for years doing nothing more than cutting and pasting other people’s scripts. By the way, we’re not talking about stealing code. Many developers freely offer their scripts in return for an acknowledgement in the source code, and some don’t even ask for that (http:// javascripts.earthweb.com/).

Likewise, many other web designers get along by using WYSIWYG editors such as Macromedia Dreamweaver and Adobe Golive and image editors such as Macromedia Fireworks—programs that can create many standard JavaScript functions for you. Some respected web designers have never programmed a line of JavaScript code; they let Dreamweaver do it.

But most web designers do learn at least the basics of JavaScript because, sooner or later, they run into problems they cannot solve without it. A problem like this can occur: A certain page does not display properly in Netscape 4. The solution would be to create an alternate page that does work in Netscape 4 and use JavaScript to send Netscape 4 users to that alternate page. For nearly every design problem like this, there is a simple JavaScript solution.

The other problem with cutting and pasting (or relying on a WYSIWYG editor) is that browsers change, web standards evolve, and cut-and-paste scripts as well as WYSIWYG editors tend to lag behind.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]