MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API Specifikace Strana 279

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 692
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 278
The File I/O API 279
Returns
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
if the write succeeds. It then tries to append the string "aaa" to the file and displays a second alert
if the write 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);
}
Zobrazit stránku 278
1 2 ... 274 275 276 277 278 279 280 281 282 283 284 ... 691 692

Komentáře k této Příručce

Žádné komentáře