Asynchronous submission of form data has two pain points:
1. garbled Coding
In fact, the bottom layer of ajax technology is unicode encoding. garbled code occurs when GBK pages interact with interfaces. There are multiple solutions, which can
LieHuo76.Net teaches 79 Cheng a very simple and common JS to get the URL code of the current webpage. In fact, this is a useful function, sometimes we do not want to use dynamic Web languages such as ASP, PHP, and JSP to intercept strings in URLs.
When parameters are submitted between different websites. For example, if website A is A UTF-8 code, submit A link to bkjia.com (GBK)Http://s.bkjia.com /? Q = Cup & sp = on will cause transcoding problems. Provides a function. To http://s.bkjia.com /
When the shutter opens the webpage, a line of Js code can be implemented. This is a kind of webpage transition effect. When the link is opened, wait for the page to load and display it slowly in the form of a shutter, the Code is also very simple.
Although few tables are currently used, some writing operations still need to be used.
Today, when I was working on the F7Dialog2.0 project, I encountered the CSS width and height for getting table cells. I think it is very easy to get the width and
Js Code for obtaining the date: the day before yesterday, yesterday, today, tomorrow, the day after tomorrow, and the day after tomorrow:
Method 1:
Copy to ClipboardReference: [www.bkjia.com]
js acquisition date: the day before yesterday,
In a test set compiled by cssrain, there is such a question:
Run code box
If the page cannot be displayed, press Ctrl + F5 to refresh the page. For more webpage code: http://www.bkjia.com/
Tip: the code can be modified before running!
In
In this chapter, I will talk about some of the oldest ways to add event handlers, which are even supported by the second-generation browsers.
These old browsers only support one method for registering an event handler, which was invented by Netscape.
I believe that when you browse Google Map, you will notice that you can scroll up or down the mouse to zoom in or out the Map. In fact, we are no stranger to mouse scrolling. However, to bind a mouse scroll event to an element, we need to have a
Both instanceof and typeof can be used to determine whether a variable is null or of any type.Typeof is used to obtain the type of a variable. Generally, typeof can only return the following results: number, boolean, string, function, object,
Javascript does not implement a hash table (hashtable) like c # and java. In js, the implementation of object attributes is the hash table. Therefore, as long as the point method is encapsulated on the object, the simple and efficient hashtable can
I. document. formName. item ("itemName ")Problem description: in IE, you can use document. formName. item ("itemName") or document. formName. elements ["elementName"]; In Firefox, only document. formName. elements ["elementName"].Solution: Use
If the requirement for dynamic client interaction is relatively high and elements need to be added frequently and dynamically in the DOM, performance problems may occur, so DocumentFragment may be used. For more information, see the following
Web applications often use Javascript to process some things on the page. We don't need to talk about form verification. We need to deal with the DOM tree of the page when displaying/hiding or executing a js function based on the user's usage. Take
When it comes to cascade, read the following code:
Set ("UserDiv ").Width (160 ).Height (26 ).Border ("1px solid # ff0000 ").Background ("#00ff00 ");
It may be a bit familiar. If you use jquery or have read some jquery code,
In the Tutorial at (www.bkjia.com), someone asked the Technical Group whether a layer can always be in the middle of the webpage. Whether the window is enlarged or reduced, the answer is yes, the example code is as follows:
helper house
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service