I am developing a HTA application, for that I need to store some data at client side using JavaScript. Like localStorage in HTML5, I am just looking for same functionality if possible. Please let me know if I can found any.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
I'm not sure if it still works with newer IE versions (>6), but you can try the FileSystemObject ActiveX component.
In hta, you can sotre your data into Microsoft Access *.mdb. see this
or you can use Google Gears for mysql support.
In HTA you are free to use any ActiveX you want.
FileSystemObject
is the best solution for simple folder and file actions, though it can read and write text files only. With this ActiveX Control you can also create and delete folders and files, retrieve their properties etc.FSO and HTAs are still working in IE9. However, all development and support was ended at IE7, so all HTML and JavaScript capabilites (and bugs) are on that level too. To utilize features available to IE9, use
<meta http-equiv="x-ua-compatible" content="ie=9">
in<head>
. This works with single pages only, and can't be used withinframeset
-pages.FileSystemObject: http://msdn.microsoft.com/en-us/library/6kxy1a51%28v=vs.84%29.aspx HyperText-Applications: http://msdn.microsoft.com/en-us/library/ms536471%28v=vs.85%29.aspx
Basic functions in FileSystemObject
Create an ActiveX:
Write a file:
Open a file:
See also
WScript.Shell
: http://msdn.microsoft.com/en-us/library/98591fh7%28v=vs.84%29.aspx