Everybody loves the versatility that JavaScript can bring to your web pages, yet not as many people love programming JavaScript. Go figure.
Dreamweaver makes your life easier by allowing you to insert Behaviors, most of which directly translate into JavaScript. Using behaviors, you can do things like insert pop-up windows, create disjointed rollovers, check to see if users have a certain plug-in or what browser theyre running.
Commands save you work by automating complex tasks, like creating a photo album or checking HTML for redundancy or unneeded tags.
The best thing about behaviors and commands is that they are extendable. Many third party companies and individuals write commands and behaviors for Dreamweaver. You can download these extensions from the web, most often for free! Our web design course has even made some custom behaviors available to you!Behaviors are mostly JavaScripts made easy. To work with Behaviors, youll have to open the Behaviors Inspector:
WINDOW-> BEHAVIORS
Notice that the Behavior Inspector has a window labeled "Events For:" Make sure this is set to "4.0 and Later Browsers". You can set behaviors specifically for Netscape or IE, but why would you? Browser versions 3.0 and below have trouble with JavaScripts, so its best to leave them out right now. Later, you can run a special check to see what version browser someone is using. If theyre using (shudder) 3.0 or below, you can automatically direct them to a page designed for them.
The most important (and often overlooked) part of the Behavior inspector is the title bar. You will apply different behaviors (JavaScripts) to different elements. For example, you must have the <body> selected if you wish to check a browser version or pop a window up on load.
Put an image and some text on the screen.
Click the image and the text. Watch as the tag identified in the title bar of the Behavior Inspector changes.
Adding Behaviors
To add a behavior:
1. Click the element you wish to add a behavior to: <body>, an image, a link
2. Click the "+" on the Behaviors Inspector to add a behavior
3. Choose your behavior.
("Open Browser Window") chosen in example below.
4. Use the Events pull down to determine when your behavior event will occur.
Note that different options are available, depending what youre adding the behavior to. For example, when adding a behavior to a form, you can choose "on submit" as the event to trigger an action.
Useful <body> Behaviors
To use the <body> behaviors, you must be clicked into the body. This can sometimes be tricky. You may often be clicked inside a <p> tag. Remember that you can choose the tag youre editing by clicking on it in the lower left corner of the Dreamweaver window.
Some of the most useful <body> behaviors are:
Check Browser: You can check what browser a user is operating and redirect them to a page designed for their particular set up.
Check Plug-in: If your page uses elements that require a plug-in, you can check to make sure that your users have the correct plug-in before proceeding. If they dont, you can automatically direct them to a page that is plug-in free, or you can direct them to get the plug-in.
Go to URL: Automatically shuttles a user off to another URL, used when a page changes location. You can change the behavior so that it works on the page load, or when a user exits. Use this power only for good and never for evil.
Play Sound: Plays a .WAV or .AIFF file. Note that these files are large and take a fair amount of time to download. A small sound is okay, but stay away from extended sounds. Later youll learn how to stream MP3s and Real Audio.
Pop-up Message: A pop-up window appears upon load. Be careful not to get annoying.
buy adobe dreamweaver cs6 mac pc only at $ 50
Want buy adobe photoshop cs6 at cheap price? you can go to my webshop to buy it ,cheap dreamweaver cs6 full version .
It is not a OEM or tryout version.
We offer worldwide shippment .
You can pay by paypal.
没有评论:
发表评论