Wednesday, October 28, 2009

Dreamweaver searchs replaced skill

In the course that builds a website in development, perhaps we can encounter such situation, the website that becomes us had undertaken comparativing one part, discover however still need to undertake modification to certain details. Rely on handiwork completely impossibly to was changed at that time, how to do? Use Dreamwaver to be searched mediumly replace can help implementation these modification.

Of Dreamwaver search replace a function very powerful, search in it in replacing a dialog box, can use even accurate " inquiry language " will control search a process. We are in Dreamwaver v " search a dialog box " shortcut key is " Ctrl+H " , the action that inputs casing individually is: Uppermost " Find " with will point out searched limits, have 3 option, the first is search inside current file, the 2nd points to search in current Site, the 3rd is search in appointing folder, if our pitch on this folder shape pushbutton that is about to click the right side appoints folder; Below " Find " the type that uses a choice to search, if choose " Text " it is to point to search a type to be text () of blame HTML code, other a few ordinal search to be in HTML code, advanced text version is searched, include Tag search; The input of right wants an input to wait for searched content in casing; Below " Replace " point to should replace why content.

Let us lift an example to explain how to be used search a function. In assuming we consider a text text version " Dreamwaver " replace for " Dreamwaver " , if be used only " Text " search, meet<In Title> " Dreamwaver " also replace, we do not hope such. So we were used " advanced Text is searched " , will search a condition (" + " , " - " the content with right button) set for " Inside Tag " and " Font " , means searchs the character inside Font label " Dreamwaver " , replace its next for " Dreamwaver " . Need a specification is to search level option to must be chosen for " Match Case " , must match completely namely search a condition, otherwise the size in the character writes discriminative general by oversight.

After the setting is good, click " Replace All " , search replace a process to begin, replace all is replaced places after ending to be able to show in replacing news list, the little green place before the file expresses to replace a success.

How does that realize those who include Tag to search replace? Assume all pictures in our website were installed " Alt " attribute (only setting pursues and the graph of individual supplementary angle does not install this attribute) , but because do what the picture sets without the attention when the webpage " Border " property value is " 0 " , individual picture is in frame appears when browsing and affected the result that browse, want so all already set " Alt " of the picture of the value " Border " the value is set for " 0 " , and it is impossible to change one by one that in the picture a lot of circumstances issue us, if use Dreamwaver to include those who have Tag to search,replace a function at this moment, solve a problem very can simply.

We first folder of make choice of, set next include inside Img label, have " Alt " attribute and accord with " Alt=any Value " as search a condition, again " Action " set for " Set Attribute " , " Border " , " 0 " , the meaning of this setting is the picture to according with a condition its " Border " attribute is unified set for " 0 " , click " Replace All " pushbutton. Very fast, search replace finished, picture attribute is met by accurate without revise by accident.

What need reminds is when undertaking searching replacing, the document that is handled is in by editorial condition, can appear likely otherwise replace the issue that make mistake.


 

No comments:

Post a Comment