Summary of the Web development phase (2) and summary of the Web development phase
1. Today's browsers are more intelligent. When the database data changes, the cache data on the web page will not be read. Use the following code to access the
1. The web contains three directories:
1.1 content.htm // run the file directly.
1.2 JS // Several JS files useful here, where the data source starting with dB (that is, the JSON string)
1.3 CSS // css.
2. Run content.htm directly to view the page
JSON rules are simple: the object is an unordered set of 'name/value' pairs. An object starts with "{" (left parenthesis) and ends with "}" (right Parenthesis. Each "name" is followed by a ":" (colon); "," (comma) is used to separate the "name/value"
Preface
This article is my Practice of Improving the loading speed of ASP. NET pages. These practices are divided into the following parts:
1. Use the HTTP module to control the page lifecycle.
2. Customize response. Filter to get the static content
Compare jquery's implementation of these two interactions:
HTML-based interaction:
Function verify () {// method 1 to solve the Chinese Garbled text problem. The data sent by the page is used as an encodeuri, and the server uses new string (old.
The Chinese Garbled text in Java should be a problem we often encounter. Today we will summarize the solutions to the Garbled text problem:
1. The Link contains Chinese characters. Add
In this way, if the data obtained in the background is not
In daily development, we often encounter the following requirement: request a network data and initiate the next operation request based on the obtained results. An example: automatically search for the most popular mobile phone product and search
Preface
This article is my Practice of Improving the loading speed of ASP. NET pages. These practices are divided into the following parts:
1. Use the HTTP module to control the page lifecycle.
2. Customize response. Filter to get the static
Recently, I want to use ajax to implement three-level linkage. However, when the servlet URL is assigned, xmlhttpreq. status returns 404, that is, the servlet is not found and the URL path is incorrect.
I configured it like this in Web. xml.
Address:
Http://hi.baidu.com/comasp/blog/item/e13e928b4eeb59d2fc1f10d8.html
I encountered this exception when passing parameters through Ajax. After finding something online for N days, I still did not find the answer. It turns out that I have
It mainly integrates common extensions, including Dom and String, Array, StringBuffer, and NameSpace. Of course Ajax is indispensable. The size is about 8 KB. Because the volume is strictly controlled, the function is limited. If you only need the
Garbled characters occur when calling the ajax method using portotype. In this case, add
You can try; Page. Response. Charset = "gb2312 ";
If it does not work, someone provides another solution:Code
Code highlighting produced by Actipro
The question is a little big, but the question mentioned in this article is very small. It seems that C # is praised, but it is not.
This small problem comes from the application scenario where a third-party API is called using http post. A
Django url, static file, POST request configuration, djangourl
Pycharm is usually used, so this article mainly explains how to use the default django project created by pycharm. The project directory is as follows:
1. URL Configuration
After
Jsonp, jsonp cross-Origin
Jsonp
We know that normal ajax requests have no cross-origin access permission. This is the function of the browser's security policy.
Index. php:
Js Code in test.html:
$.ajax({ type: "post", url:
Basic =================================================== ======
1. the most classic problem is the cache problem in ie.
If get is used, a cache problem occurs in ie. The code is executed only once. The solution is to add a timestamp or random
XMLHTTP uses Unicode encoding to upload data, while the general page uses gb2312, which leads to garbled Characters During page display. when the page is obtained, XMLHttp returns UTF-8 encoding, which causes garbled characters in the display.
One
$. GetJSON () is an asynchronous ajax transmission function. The following section describes how to use $. getJSON () in jquery to implement cross-origin requests. I hope this method will be helpful to you.
In jQuery, getJSON is often used to call
In this case, the server will not receive the code {code...}, but the server will receive the code. Why? If the code {code...} is written like this, the server cannot receive:
Xmlhttp. open ("POST", "03.php", true); // cannot receive!
But the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.