Adobe Dreamweaver API Reference CS5 Bedienungsanleitung Seite 18

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 533
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 17
13
DREAMWEAVER API REFERENCE
The file I/O API
Last updated 8/27/2013
The text argument indicates the string the function has to write.
The mode argument, if it is supplied, must be append. If this argument is omitted, the string overwrites the contents
of the file.
Returns
A Boolean value: true if the string is successfully written to the file; false otherwise.
Example
The following code attempts to write the string xxx to the mydata.txt file and displays an alert message if the write
operation succeeds. It then tries to append the string
aaa to the file and displays a second alert if the write operation
succeeds. After executing this script, the mydata.txt file contains the text
xxxaaa and nothing else.
var fileURL = "file:///c|/temp/mydata.txt";
if (DWfile.write(fileURL, "xxx")){
alert("Wrote xxx to " + fileURL);
}
if (DWfile.write(fileURL, "aaa", "append")){
alert("Appended aaa to " + fileURL);
}
Seitenansicht 17
1 2 ... 13 14 15 16 17 18 19 20 21 22 23 ... 532 533

Kommentare zu diesen Handbüchern

Keine Kommentare