Following IE instead of Internet Explorer, MF replaces Mozzila Firefox1. Document.form.item question(1) Existing problems:There are many Document.formname.item ("itemname") statements in existing code that cannot be run under MF(2) Solution:Switch
(a) How to use jquery to refresh a picture?Description: We all know that when we request a resource (such as a Web page, picture, etc.), if the resource is cached in the browser, the request returns a cached copy, not the resource we want to acquire
Firefox uses Dommousescroll, and other browsers use MouseWheel. When scrolling event triggers Firefox uses the Detail property to capture wheel information, and other browsers use Wheeldelta. I don't know why other vendors and Microsoft are so
Document text Object-JavaScript scripting language description
Note: The names of the element name attribute and JavaScript reference on the page must be consistent including caseOr you'll be prompted with an error message "The referenced element
Confirm () method
The Confirm () method displays a dialog box with the specified message and the OK and Cancel buttons.
Note: If the user clicks the OK button, confirm () returns TRUE. If you click the Cancel button, confirm () returns false
A:
Three kinds of dialog box diagram:The following three images are alert (), confirm () and prompt ().
Alert () dialog box prompts
Confirm () dialog box prompts
Prompt () dialog box prompts
Three kinds of dialog
1, Direct document.write
The code is as follows
Copy Code
");
2, dynamically changing the SRC attribute of the existing script
The code is as follows
Copy Code
3.
1. Floating point conversion to integer type, this is more error-prone, many people like to use parseint (), in fact, parseint () is used to convert strings to numbers, rather than floating-point number and integer conversion between, we should use
This article implemented the Dos attack method is very simple is set a few seconds to refresh the current page, which can effectively prevent Dos attacks.
Look at the example below
Title: Content:
Looping JavaScript for loop in JavaScript uses the number of times specified to execute the same code block or the specified condition is true.ExampleFor loopHow to write a loop. The number of times that the same code block is run by the closed loop
Recently learn JavaScript, encounter caller and callee problems, go online Baidu a lot. Found the content of Datong small benefit, collation summed up a bit to share with you.
Caller: Returns a reference to a function that calls a functions
This article describes the JavaScript implementation of the image carousel method. Share to everyone for your reference. as follows:
jquery is not used here, there is no transition effect, the picture can be replaced by itself.
Test2.html page:
ActionScript calls JavaScript
You need to introduce flash.external.ExternalInterface, where you use the call method of the Externalinterface class:
Externalinterface.call (functionname:string,... arguments):*, Fuctionname:
The name of the
JSON has a very strict syntax, in the string context {"prop": "Val"} is a valid JSON, but {prop: "Val"} and {' prop ': ' Val '} is indeed illegal. All property names and their values must be enclosed in double quotation marks and cannot be used in
Where will the CSS block, and where the JS block will appear?The blocking characteristics of JS:All browsers in the download JS, will block all other activities, such as the download of other resources, content rendering and so on. Until JS
If you have focus, you must lose Focus. The onblur event and onfocus are relative events when the cursor leaves the current get polyThe onblur event is triggered while the calling program is Executed.The following code, the page has a user and
Native js achieves seamless Horizontal Rolling and js horizontal seamless
Seamless horizontal scrolling
Supports image and text scrolling.Principle:A large box contains two boxes, which are implemented by setting the offsetWidth and scrollLeft
Tip: you can modify some code before running JS Open layer/close layer/move layer animation effect-[Open layer] [close layer] Mobile layer Tip: you can modify some code before running
Tip: you can modify some code before running Javascript beautiful and practical perpetual calendar codeBeautiful and practical perpetual calendar与之间-->与之间--> AD Year Lunar calendar year [year]
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