I found some small javascript notes on my computer many years ago. Because I had to sort out the files in my notebook and delete them without having to, I 'd like to release this note, archive the file to your blog, and delete all the following files on your computer:
2010.11.29
1. [window.] alert ();
Document. alinkColor
TextString. anchor ()
Navigator. appCodeName
Escape ("Hi! ") Returns the ascii code.
Eval ("x + y") Evaluate the string x = 10, y = 20; eval = 30
FormName. elementName. focus (); set the element to focus
History. forward () Browser
Date-related functions
Date. getDate () returns the Date from 1 to 31.
Date. getDay () returns the values from Monday to Saturday of the week between 0 and 6.
Date. getHours () returns 0-23
Date. getMinutes ()
Date. getMonth ()
Date. getSeconds ()
Date. getTime () Get the number of milliseconds that have elapsed since January 1 ,.
Description
{
}
Date. getTimezoneOffset () returns the client's time difference GMT
Date. getYear ();
History. go ();
Document. linkName. hash returns the string after # in the Url. The same usage includes document. links [0]. hash, document. location. hash.
Document. history Object
Document. history. forward ();
Document. history. back ();
Document. history. go (-1),-2
Location. host, linkName. host, linkName. port return host name and port
Location. hostname
Location. href
FormName. selectName. options [index]. index Returns a subscript of the selected element.
IsNaN () checks whether it is a number
StringName. italics () is set to XIE format
StringName. lastIndexOf ('O'); returns the index subscript of a character starting at the end of a string.
StringName. link ();
Event
OnChange = ""
OnClick = ""
OnFocus = ""
OnLoad = ""
OnMouseOver = ""
OnSelect = ""
OnSubmit = ""
OnUnload = "" When exiting the document
Document. open ([MIMETYPE])
Window. open ("url", "windows name" [, "windowFeatures"])
Math. random () returns a random number between 0 and 1.
Math. round (argument) Rounding
FormName. resetButtonName
Window. status
StringName. strike () converts a character into a word with a strikethrough.
StringNAme. sub () converts a character into a subscript text format
FormName. submit () executes the same action as clicking the submit button
StringName. substring (index1, index2)
StringName. sup () is converted to the superscript format.
Target specifies a window name string formName.tar get, forms?index=.target, location.target, link.target, links=index=.tar get
Document. title return The read value in the tag. If it is not included, it is NULL.
Date. toGMTString () converts a Date to a time string
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