JavaScript can not do things 6,7

2009-03-09  来源:本站原创  分类:AJAX  人气:557 

Although in many respects, JavaScript can be used to improve your website and improve your efficiency visit the Web site, but it also has a few things the JavaScript can not do. One of some of the limitations are because of the script to run the browser window and therefore can not access the server, while others are out of security considerations, in order to prevent tampering with your computer's website. For these limitations have not yet can be the solution, and any JavaScript can not complain about their computer to perform the following tasks of the people, are not because of the thoughtful things to do.

Without the help of server-side scripting, JavaScript will not be able to write files on the server

The use of Ajax, JavaScript can send a request to the server. This request can be XML or plain text document to read manner, but it should not write papers, unless the server calls the script file to run in order to write a document. Http:// download Shy love such as tianxing this page are obtained using json , but this page can not directly write data.
JavaScript can not access the database

Unless you use Ajax, and server-side script for you to implement database access

JavaScript from the user should not read or write Office documents

Although the JavaScript on the client running on the computer while the client is also browse the Web, but still does not allow for any page other than the data itself for a visit. This is for safety considerations, because other pages may have to update your computer and illegally installed on the things we all do not know. The only exception is the so-called cookies file, it is a small text file, you can write and read by the JavaScript. The browser restrictions on Cookie's visit, so a given page can only visit the website created by the cookie.

If you do not open the window, JavaScript should not select the window

The same restrictions for security considerations

JavaScript can not access the website

Despite the different pages can be open at the same time, you can in a separate browser or browser with a different form to open. Running on a web page JavaScript subordinate to a web page, so should not visit the domain name from different pages of different information. This limitation helps to ensure the privacy of your information will not be open at the same time other people to share web pages. The only access from another domain documents are on your server Ajax call, and they have a domain name can access other server-side scripting.

JavaScript should not protect your pages and images

Page images are separate from any download to your computer, so we look at the page when already have a backup of all images. As for the real HTML pages of resources, but also the same. Pages necessary to decrypt all encrypted pages to display the page. And an encrypted me that may require the order to activate JavaScript, to achieve in order to decrypt and then display purposes. Once the pages have been declassified, any person aware of the methods can easily save web pages to decrypt the backup resources, such as the Official Road Merry this latest chapter 520 pages, but one download to the client, those on this page considerable js, css, jpg, etc. http connection is also a download to your local.

  • JavaScript inheritance 2009-02-27

    About JavaScript inherited a small example ... <! DOCTYPE HTML PUBLIC "- / / W3C / / DTD HTML 4.01 / / EN" ""> <html> <head> <meta http-equiv="Content-Type" content=&q

  • A common JavaScript page 2009-02-27

    1.JavaScript code Pagination=function(id) { var totalNum=0; var maxNum=10; var pageUrl=""; var breakpage = 5; var currentposition = 0; var breakspace = 2; var maxspace = 4; var currentpage=1; var perpage=10; var id =id; this.initPage = function(

  • Javascript Object Model 2009-03-01

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>javascript.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-

  • javascript regular expressions Basic Usage 2009-03-01

    <script type="text/javascript"> window.onload = function(){ //RegExpInitialization ,gRefers to the global ,iIs case-insensitive var reg = new RegExp("cat","gi"); var exp = /cat/gi; //RegExpThe test ()Method ,The return

  • Depth understanding of the eval function in javascript 2009-03-01 In this paper, the discovery of an appropriate title is not so easy, huh, huh, so in this note under the first two purposes of this article: (1) introduction of the eval function in javascript usage (2) how to

  • Javascript object inheritance 2009-03-02

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>javascriptInherited.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <m

  • javascript: history.go () and History.back () the difference between collections 2009-03-03

    <input type=button value= Refresh > <input type=button value= Forward > <input type=button value= Back > <input type=button value= Forward > <input type=button value= Back > Back + refresh <input type=button value= Back &g

  • javascript built-in functions Info 2009-03-03

    48. In the old browsers do not perform this JS :<!-- //--> 49. To quote a document-style JS: <script type="text/javascript" src="/blog/aaa.js"> </ script> 50. Specified in the script does not support the browser displ

  • Javascript in the browser environment (seven) XMLHttpRequest 2009-03-03

    XMLHttpRequest XMLHttpRequest is a function used to create a http request. XHR initial IE through ActiveX objects are realized. After the beginning of the various browsers support. Now AJAX is the popular XMLHttpRequest object to the adoption of the

  • Javascript in the browser environment (vi) incident 2009-03-04

    Matter Examples of a lot of events. Such as user input, the click of a button and so on. Can put a javascript function assigned to an event (this can be called the event listener or event handler), when the incident happened, and will perform this fu

  • javascript to determine the current browser and operating system version 2009-03-04

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>useragent.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-e

  • javascript abnormal 2009-03-04

    <html> <head> <script type="text/javascript"> var txt = "" function message () ( try ( adddlert ( "Welcome guest!") ) catch (err) ( txt = "There was an error on this page. \ n \ n" txt + = "Er

  • [To] javascript implementation of telecommunications network automatically select two-lane 2009-03-04

    Web site open quickly is very important, whether you are using what network are opened soon. We did not talk about the early stages of product development user groups because it does not matter much, if you as a student, then in accordance with our o

  • javascript implementation of telecommunications network automatically select two-lane 2009-03-05

    Open the Web site as fast as it is very important, no matter what you use, open quickly. Let us not talk about the product's initial development user group because it does not make much sense, if you navigate to the students, according to our own fou

  • IE and Firefox (Firefox) in the JavaScript area is not compatible and unified method summarized 2009-03-05

    Today, the test code, found ajax can be run in IE, but in FF. IEAnd Firefox (Firefox )In JavaScript incompatibility and unified approach summarized as follows: 1.Compatible with Firefox outerHTML, FF no outerHtml method. if (window.HTMLElement) { HTM

  • javascript of this 2009-03-05

    javascript of this: First look at a section of code: function test(){ //The definition of a function alert(this.p); } //To define two objects var obj1=new Object(); var obj2=new Object(); //To add the two objects, and properties p is equal to 1 and 2

  • JavaScript's "this" 2009-03-05

    Read recently in Programming Languages Pragmatics when they see this, although does not seem to do anything worth mentioning, in order to avoid forgotten or recorded. JavaScript's this is called object. Say the image is that "." Prior to that ob

  • Depth understanding of Javascript closure (closure) 2009-03-06

    Recently, online access to a lot of Javascript closure (closure) of relevant information and writing are very academic and professional. For beginners to understand let alone closure, and even the language describing it is very difficult to understan

  • javascript form 2009-03-06

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>formUtil.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-eq

  • yiwei project management and maintenance of Javascript 2009-03-06

    Namespace (namespace): A headache for the developers is the question how to prevent function name / class name and other people's conflicts, in an internal project team can be named among the scheduled (such as additional prefix, etc.) to solve this