JS can do many things

JS can do many things, such as:

Use JavaScript can do many things to make web pages more interactive and provide better for site users, more exciting experience.
JavaScript allows you to create a user interface event when the user navigate between pages, the interface will be fed back to the user.
Use javascript to ensure that users enter valid information in the form, saving your business time and money.
Use javascript, HTML can create customized according to user operation page .
JavaScript can also handle forms, set a cookie, the immediate construction of HTML pages and create Web-based applications.
In fact, javascript is a client side language. (In fact, there is a server-side implementation of JavaScript version.) In other words, it is designed to perform tasks on the user's machine, rather than on the server. Therefore, javascript has some inherent limitations, primarily due to security reasons:

javascript not allowed to read and write files on the client. This is good, because you do not want pages to read files on the hard disk, or a virus written to disk, or manipulate files on your computer. The only exception is, javascript can be written to the cookie file of the browser, but there are some limitations.
javascript is not allowed to write files on the server computer. Although written in files on the server in many ways very convenient (for example, fill out the form to store user clicks or page data), but JavaScript is not allowed to do so. Instead, you need to have a program on the server to process and store data. This program can be written in Perl or PHP CGI program that runs on the server, or Java programs.
Javascript is not their open windows can not be closed. This is to prevent a site close the window on any other sites to monopolize the browser.
javascript can not read information from another server on the open page. In other words, the page can not read information from other open windows, making it impossible to detect what other sites are here.

Guess you like

Origin www.cnblogs.com/blogst/p/10949839.html