Let's first look at the final effect:
Step 1: BasicBuild the basic code and see the demo:
Xmlns = "http://www.w3.org/1999/xhtml">
1. Construct basic HTML structures and CSS styles
Status 0%:
Status 50%:
Status 80%:
Status 100%:
Function: Split () Function: uses a specified separator to split a string and store it in an array.Example:STR = "JPG | BMP | GIF | ICO | PNG ";Arr = thestring. Split ("| ");// Arr is an array containing character values "jpg", "BMP", "GIF", "ICO",
For example:
1. Document. All () does not work in ff. It must be changed to document. getelementbyid ();
2. obj. innertext = "XXX"; in FF, it seems that there are occasional problems. Change to OBJ. innerhtml = "XXX.
3. var Ole = Document. Body.
This article
Article Internet Explorer and Firefox have seven different aspects in Javascript syntax.
1. CSS "float" attributesThe basic syntax for getting a specific CSS attribute of a given object is the object. Style attribute, and the
1 2 3
[Ctrl + A select all Note: If you need to introduce external JS, You need to refresh it to execute]
Javascript verification is a positive integer CopyCodeThe Code is as follows: If (value Alert ("not a positive integer ");}
The last time we performed table sorting, we had some knowledge about the table. This time, we learned a little more about it and found that the table was not so simple.
If you still don't know what this effect is, just call row locating. I wanted
Globalstorage
This is also proposed in HTML5. After the browser is closed, the information stored in globalstorage can still be retained, and the storage capacity is much larger than that of userdata in IE. The storage capacity of a domain is 5120
I am so busy recently. Please update on May 1.
Program Right.
This version mainly adds and improves the following:
1. Use localecompare to compare strings;
2. Multiple sorting objects can be used in a single sorting (used for sorting when values
Environment: Under rails
For example:
After I click Modify, it is displayed as follows:
Key implementation process:
1. The list part, that is, the first image, and the blue part, that is, the value is passed.
CopyCode The Code is as follows:
Date. Prototype. isleapyear
Date. Prototype. format
Date. Prototype. dateadd date calculation
Date. Prototype. datediff compare date difference
Date. Prototype. tostring date to string
Date. Prototype. toarray date is split into Arrays
Date.
Method 1:
Use a browser internal converter to implement conversion by dynamically creating a container label element, such as Div, and setting the string to be converted to the innertext of this element (ie supported) | textcontent (supported by
First give a good
Code :
[Ctrl + A select all Note: If you need to introduce external JS, You need to refresh it to execute]
The second option is also good. This. disabled = true; var me = This; setTimeout (function () {me. disabled =
Next we will talk about the use of regular expressions labeled with "g". First, let's take a look
Code It is easier to understand from the examples.
Copy code The Code is as follows: 1 function a (VAL)
2 {
3 var Re =/^ \ D + $/g;
4 alert (Re.
CopyCode The Code is as follows: function uniencode (text)
{
TEXT = escape (text. tostring (). Replace (/\ +/g, "% 2B ");
VaR matches = text. Match (/(% ([0-9a-f] {2})/Gi );
If (matches)
{
For (VAR matchid = 0; matchid {
VaR code = matches [matchid].
Principle: innerText or innerHTML
Copy codeThe Code is as follows:
Test
InnerText and innerHTML are two non-DOM standard methods.Difference:(InnerText in the figure)
In IE, both innerText and inner HTML methods can run normally.
However,
Mozilla:
How to Use addEventListener:
Target. addEventListener (type, listener, useCapture );
Target: document node, document, window, or XMLHttpRequest.Type: String, event name, excluding "on", such as "click", "mouseover", and "keydown.Listener:
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