1. Differences between onchange events and onpropertychange events:
The onchange event is triggered when the content changes (two times the content may be equal) and the focus is lost. The onpropertychange event is triggered in real time, and is
Integer types often cause some strange problems in JavaScript. In ECMAScript specifications, they only exist in concepts:
All digits are floating-point numbers, and integers are not a group of digits without decimal places.
In this blog, I will
The Sting String object is one of the built-in objects provided by Javascript.Note that the first character in the string is 0th characters, and the second character is 1st characters.1. method for creating a String object[Var] String object
JS judges that an object has obtained the focus document. activeElement. tagName // tagName Tag Name
Instance: Disable the input method when determining whether the body obtains the cursor.Copy codeThe Code is as follows:Var act = document.
Every WINDOW object, whether it is a regular HTML page. Framework set page. Both the sub-framework and the Sun Tzu framework have a TOP attribute. This property returns a reference to the top-level javase object loaded into the browser;
. If the
In the previous chapter, I introduced some area editing modules that can be added to the mask page. This chapter describes how to display the mask layer on the parent page and how to display a dialog in translucent state. Dialog is the pop-up
1. dynamically load js and css files (using native js and jquery)Iframe structure:Frame0 (parent)Frame2 (sub)Frame3 (sub)In frame2, the trigger event dynamically loads js, css files, and dom elements to frame3?* The same level can be called. You can
In the original article, Twitter and Facebook were used. I think it is useful to get the tool class JSONP.Many popular APIs require authentication to obtain information.Since I can access these pages and obtain information, why don't I use some
After a manned page, the browser's output stream is automatically closed. After that, any document. write () method that operates on the current page opens a new output stream. It clears the content of the current page (including any variables or
There is no difference between the two statements below, but there is little code...
Copy codeThe Code is as follows:
Jquery has three methods to determine checked:Copy codeThe Code is as follows:. Attr ('checked'): // check version 1.6 + and return:
The timestamp imported by PHP to JS processing. Why can't I always get the correct number? The original JS timestamp is 13 BITs, including 3 bits in milliseconds, PHP only contains 10 characters, excluding milliseconds.
Var nowtime = (new Date ).
Load HTML
We usually use the method of loading HTML to load HTML fragments and insert them to the specified position. Assume that the current page is:
load
The content of the test.html file in the same directory is:
test
We can use the load method
Observation Function
The ajaxStart and ajaxStop functions can be used as observation functions. We can use the callback functions of observation functions for corresponding processing.
When an Ajax request starts and no other transmission is
Later, I checked some relevant information and found that the window is used in IE. location. href or HTTP_REFERER cannot be obtained. It is really a browser that doesn't understand IE. Many browsers run very well, but it doesn't support it. There
In a word: = convert the type before comparison, = first judge the type, if not the same type, it is directly false.===Indicates constant equals, and the two sides of the comparison must be absolutely the same
alert(0 == ""); // truealert(0 == false)
Using brute force means to disable the right mouse button is not user-friendly, so it is best to disable the right mouse button selectively.
The code example is as follows:
footfall house
The above Code meets our requirements. Next
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.