This event is different from IE under the standard. Firefox is implemented according to the standard. The event name is "dommousescroll", and that of IE is "mousewheel ".
Of course, one line
CodeThe compatibility problem is solved.
Copy codeThe
We know
Javascript It is an interpreted language. Its execution is from top to bottom, but the understanding of each browser is slightly different, and
Code Upstream and downstream, that is
Program Stream is also crucial to program correctness,
There are the following implementation methods:
In Firefox, Google Chrome, Safari, and opera: You can use window. getselection () (refer to MDC)
In IE, you can use document. selection. createRange (). Text (refer to msdn)
Note: Put the two
In view of the security requirements, this object receives many restrictions, and now only the following attributes and methods are left. The History history object has the Length attribute, listing the number of historical items. The history that
1st methods:
IE6:
[Ctrl + A select all Note: If you need to introduce external JS, You need to refresh it to execute]
IE7: [Ctrl + A select all Note: If you need to introduce external JS, You need to refresh it to execute]
IE6, IE7,
Chapter 1 Brief History of JavaScript. There is nothing to remember. I briefly introduced the origin of JS and conflicts between browsers.
Chapter 4 JavaScript syntax. It is worth noting that:
(1) strings are placed in single or double quotation
CopyCode The Code is as follows:
JavaScript printing page
Function fprint (){
// Hide the content that does not need to be printed.
Document. getelementbyid ("divoperate"). style. Display = "NONE ";
Document. All. webbrowser. execwb (7,1
To indicate the address of a window, use ". Location ". Previously, I wrote window. Location. href to refresh another framework page. I have read the detailed usage of locaiton, which is somewhat improved, as shown below:
Note: The two addresses of
first
second
third
fourth
No matter which Div we click, the 4th Div content is fed back. The reason is that each Div's click event forms a closure with the test method, and each Div's Click Event shares the same closure scope chain. When an
CopyCode The Code is as follows: using system;
Using system. Web;
Using system. Web. Services;
Using system. Web. Services. Protocols;
[WebService (namespace = "http://tempuri.org/")]
[Webservicebinding (conformsto = wsiprofiles.
Method 1: Take the link as a string, break it down according to the link format, and then obtain the corresponding parameter value.Method 2: use regular expressions for direct matching.Keyword: parameter: location. href, URL, Link, JavaScriptMethod 1
CopyCode The Code is as follows: Step 1: Write a JS script file flash. js
Program Code:
Function writeflashhtml (ARG)
{
VaR parm = []
VaR _ default_version = "8, 0, 24, 0 ";
VaR _ default_quality = "high ";
VaR _ default_align = "Middle ";
VaR _
A few days ago, the browser family gave birth to a little prince, Google's Chrome browser. Because of the birth of chrome, although he is still a little guy, no one dares to underestimate him. In the future, we often say that the browser's "Four
Use javascript to move the div layer-javascript drag layer:
Program function: Use javascript development to drag the div layer in the following html code at Will on the interface.
Javascript mobile div layer-javascript drag Layer Code-
Html
As a result, after reading it for a long time, I had a rough understanding and had a good aftertaste. It seems that I didn't understand anything...This article is written in chapter 7, 8 and 9 of .The javascript object-oriented technology
// Interval variable
Var inl = [];
// Original transparency
Var opa = 100;
// Judge the browser
Var ie = navigator. appName = "Microsoft Internet Explorer "? "Microsoft Internet Explorer ":"";
// Zoom out and open the button
Function gogo (){
Speed =
Event handling Overview
Event processing is a very important part of object-oriented programming. Without event processing, the program will become very dead and lacks flexibility. The process of event processing can be like this: Event-start event
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