Question:jsWhat does the ability of such a language depend on? (Running platform)
Answer: The currentjslanguage can run in the browser (jsIf it is You cannot operate disk files when running on the browser side), or you can runnodeJson the server side (jsCan operate files on the server side ).
Question: Whetherjscan operate the file (generally not),ajaxcan Do you want to operate files (generally not possible)?
Answer:
a. jsGenerally 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, butcookiesmall files can be operated.
b. ajaxgenerally cannot operate files; but in the latestajax level2(formDataobject )The standard provides an interface for operating files, which can directly operate files. To trulyajaxupload files without refreshing (was not used beforeajaxTo upload files without refreshing, useiframeNesting technology can also be called the most originalajax).
Answer:jscan operatecookie.cookieis a browser-side technology.Cookieis also data, the data is stored somewhere (somewhere on the client’s computer, managed by the browser)cookieThe number and size are strictly limited (4k 45)But there are currently clientslocalStorageLocal database technology (Limitations, only used in modern browsersw3cand browsersIEare 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!