当前位置: 首页 > 网络学院 > 网页制作基础教程 > WEB设计综合 > 开启DW中的无效行为
Note: This tutorial is done by Macromedia Dreamweaver MX or 8.
注意:这篇教程适用于DW MX 或 DW 8。
1. First of all, when you design a website you will take some steps to make sure your website is viewed without an error. That is why when I am attaching behaviors, I set the Show Events For to 4.0 and Later Browsers. Well this is a good precaution in preventing errors, but it has some disadvantages. For example when you set to 4.0 and Later Browsers you will loose many behaviors, thus you won't be able to apply it to the texts. But that is not a problem. There is a simple way to solve this problem. That is with the use of Null Links.
首先,当你在设计网站时,你必须确保在浏览网站的过程当中不会出现错误。这就是我为什么养成了“设置4.0以上版本浏览器所支持的行为”[这里的“行为”在DW 8中指的是“标签检查器”中的“行为”]的原因,这样做是为了防范浏览时发生错误。但是,这样做也存在弊端。举个例子来说,当你设置了“4.0以上版本浏览器所支持的行为”时,仍然会有很多行为你都不能够使用。因而,你不能将它应用于文本,而且,还不止这样一个问题。因此在这里,我会为你提供一个非常简单的解决方法,让你可以使用这些无效行为。
2. Ok first set your Show Events For to 4.0 and Later Browsers. Highlight the text you want to add a behavior and see how many behaviors you can apply. Not much isn't it. Here is what I have.
好,首先,将行为设置为在“4.0以上版本浏览器所支持的行为”。所能应用的行为文本将以高亮显示。看看你一共能使用多少种行为。你会发现,所能应用的行为并不是很多。具体如下图:
3. OK to solve this problem here is what you have to do. If your word is not highlighted, highlight it and go to properties panel and type javascript: void(0) or # either of them will work.
好,让我来告诉你如何解决这个问题吧。如果你发现很多行为并不能以高亮显示,那么,你可以在属性菜单中输入“javascript: void(0)”或“#”,两者都可以发挥作用。
4. That is all you have to do to bring most of the behaviors back... Go to Behaviors panel and click + to see how many behaviors are available now.
只要完成上面的操作,你就会发现,很多行为可以找回。打开行为面板点击“+”,你会发现很多原来不能用的行为都可以使用了。