Js and css files loaded on pages often contain parameters, such: There are two possibilities for using parameters,The script does not exist, but is dynamically generated by the server. Therefore, a version number is provided to indicate the
The code type can only be function.Undefined: undefined. We can also call it nonexistent. typeof (undefined) = undefined.Null: null. Undefined does not exist, but null does. Typeof (null) = object, but null is not an object. This is the magic and
However, in some large WEB interaction projects today, such as large WebGame projects, the influence of JavaScript event bubbling is worth noting. This article uses a simple example to explain the JavaScript event bubbling and precautions.If you don'
1. html dom is a tree object2. Each node contains some information about the node, which is:1. nodeNameThe nodeName attribute contains the name of a node.* The nodeName of an element node is the label name.* The nodeName of the attribute node is the
GetElementsByClassName ()To find out the tree menu from a lot of HTML code (maybe there are multiple), let's first implement a method to find the DOM node through className: getElementsByClassName. This is a simple but practical extension of the
This article is a video I watched from a foreign site. After some simple practices, I found that this can indeed improve the efficiency. This method is described as follows:Prerequisites:Install firefox + firebugHere, my blog is used as an example:
I remember when I was writing code at work, our technical director always said that we should first "design", so we should first "design.Ps: I'm a newbie. Sorry.. Web Game area. That is to say, you need to know the area of the game on the webpage,
Onbeforeunload is also called when the page is refreshed or closed. Onbeforeunload is called when the server is about to read a new page. At this time, it has not started reading; onunload has read the new page to be loaded from the server and is
Common garbled characters: 1. The client submits data to the backend. The parameter value is garbled, for example, a. aspx? Value = "Chinese value" & type = "% $ # (& _ special symbol ";2. garbled characters appear after the background reads data to
There are eight common examples:Mousedown: the mouse button is pressed.Mouseup: the mouse button is released.Click: click the mouse button.Dblclick: the mouse button is pressed.Contextmenu: Right-click the menu.Mouseover: move the mouse over the
Undoubtedly, importing a new style sheet directly is the best option based on the separation of presentation and structure, but in some cases it won't work. For example, if we make a DIV that can be dragged, from the perspective of setting a style,
1. question from a netizen: There are multiple forms in the web page. Each form corresponds to a type of data operation.For example, a detailed resume information page is divided1. Personal Data2. Work Experience3. Project Experience4. Other
After a form is displayed on the page, the focus is usually not placed on the first control. You only need a common script to achieve this effect.Document. forms [0]. elements [0]. focus ();If the first control on the page is a hidden field, or the
1. Reference of page elements The $ () referenced element of jquery includes methods such as id, class, element name, element hierarchy, dom or xpath conditions, and the returned object is a jquery object (set object ), you cannot directly call
The code below is mainly used to learn some operations in the control table. The code is written directly in the table. You can change it to event binding. Js obtains the value of the current row of the table click Select Tr, highlight it, and
Today, I encountered a Chinese Ajax garbled problem in one day. There are two types of Ajax garbled issues:
1. Chinese characters output by JavaScript are garbled,
For example: alert ("Chinese Garbled text test ");
The solution is relatively simple,
This article describes how to use attr (name), attr (properties), attr (key, value), attr (key, fn), and removeAttr (name.If you have any suggestions or comments on this series of articles, please send to: sjzlgt@qq.comYou can go to the official
load default image [Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]The above code works in firefox, and ie7 is invalid.The following code is obtained from chinaz. And has been used, tested, ie7,
The method used for parsing is generally eval or new function. Currently, IE8 and Firefox3.1 have built-in native JSON objects (it is said that there will be a certain performance improvement ). In actual use, how can we choose from these three
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