FlashProgramCurrently, the function of saving and loading external files is available. We can call flash in JavaScript to enable Javascript to read and write data offline to the local hard disk.
Some Japanese have written some code to implement this function. I will translate it for your reference.
Click here to download the file and decompress it to the local hard disk.
Test.html in the file is a demo file. You can refer to this file for learning.
First, copy the following three files to the web directory.
Swfobject. JS, save2local.swf, save2local. js
ThenCodeCopy to your HTML file.
<SCRIPT type = "text/JavaScript" src = "swfobject. js"> </SCRIPT>
<SCRIPT type = "text/JavaScript"
Src = "save2local. js"> </SCRIPT>
Then, you can write your own saving code. The specific example is as follows:
<SCRIPT type = "text/JavaScript"> <! --
Function Test (){
Save2local. savedata ("key", "value ");
Alert (save2local. loaddata ("key "));
}
--> </SCRIPT>
<A href = "javascript: Test ()"> William long test, click here
. </A>
This method can be used to save local data in JavaScript.
(Original address: http://www.williamlong.info/archives/1530.html)