Home  >  Article  >  Web Front-end  >  What does the ability of the js language depend on?

What does the ability of the js language depend on?

怪我咯
怪我咯Original
2017-06-26 11:56:031534browse

Question: jsWhat does the ability of such a language depend on? (Running platform)

Answer: The current js language can run in the browser (jsIf it is You cannot operate disk files when running on the browser side), or you can run nodeJs on the server side (jsCan operate files on the server side ).

Question: Whether js can operate the file (generally not), ajaxcan Do you want to operate files (generally not possible)?

Answer:

a. js Generally cannot, but depending on the situation, if it is on the server side, it can be operated. If it is on the browser side, it cannot be operated directly, but cookie small files can be operated.

b. ajax generally cannot operate files; but in the latest ajax level2(formData object )The standard provides an interface for operating files, which can directly operate files. To truly ajax upload files without refreshing ( was not used before ajax To upload files without refreshing, use iframe Nesting technology can also be called the most original ajax).

Answer: js can operate cookie. cookie is a browser-side technology. Cookie is also data, the data is stored somewhere (somewhere on the client’s computer, managed by the browser) cookie The number and size are strictly limited (4k 45)But there are currently clientslocalStorage Local database technology (Limitations, only used in modern browsers w3c and browsers IE are not supported in lower versions) .

The above is the detailed content of What does the ability of the js language depend on?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn