First: adding Strings by string
Copy Code code as follows:
var arr = [' Item 1 ', ' Item 2 ', ' Item 3 ', ...];
list = ';
for (var i = 0,
L = arr.length; I List + = ' + arr[i] + ';
}
List = ' + list + ';
This is
Recently, when making a small thing, you need to "right click" on an element to trigger a custom menu to edit the right-click entry through a custom menu. This requires that the default right-click menu be masked
The elements below IE and FF have
JavaScript has only function scopes; each function has a scope chain directly to the Window object.
The lookup of a variable is searched from the inner outer layer to find the stop.
At the same time you can not only find use, but can change
Can dynamically change elements in HTML through JavaScript
adding elements to HTML
You first need to create a label, then add the appropriate content to the label, and then add the created label to the appropriate location.
Test
Frames are used to store subpages, which can be either IFRAME or frameset. The Window object is a global object, and all functions and objects on the page are in its scope.1, parent on behalf of the window, if the parent window has several layers of
The offset of an element can be obtained by four properties:
1, Offsetheight: The size of the space occupied by the element in the vertical direction (pixel). Includes the height of the element, (visible) The height of the horizontal scroll bar,
We have all seen these effects, using the mouse wheel to implement the number in a form to increase the reduction operation, or the wheel control a button around, scroll up and down. These are through the JS to the mouse wheel event monitoring to
1. ActiveX reference to JavaScript
Copy Code code as follows:
ObjectName is the name of the ActiveX control, set by the id attribute in the tag, as follows;
Copy Code code as follows:
Name= "objectname"
Codebase=
1. Only allow numbers to be entered
2, only allowed to enter English letters, numbers and underscores (the following two ways to achieve)
3, only allowed to enter English letters, numbers and =@#
4, only
JavaScriptSerializer serialization time after the time will be serialized into the N-system Ghost data, so look up the material to sit down and record
Suppose List = News list () {new Text () {id=1,date= ' 2014-03-11 00:00:00.000 '}}
Event in IE and FF incompatible, today, the reference encountered some problems, refer to some online methods, have experience:
Aclassarray[i].onmouseover = function () {//code written directly in the inside is OK, to pass the reference can
Now popular Twitter and other micro-blogging sites, there is a good user experience, that is, in the text box input text, will automatically statistical input characters, and display the user can also enter the characters, in the limited 140 words
JavaScript drop-down list box with the current year and 50 years before and after, and the default selection is the current year
Copy Code code as follows:
{"Name": "Monkey", "Age": "a", "Height": 164.0}
If you want to make the above JSON string more readable on the page, it becomes the following style:
{
"name": "Monkey",
"age": "A",
"height": 164.0cm
}
The method described in this
1, the description
This is often the case, the date format of the page is: YYYY-MM-DD, and the date format in the database is: YYYYMMDD, between the two need to convert, you can upload to the Java background query data.
Usually, there are two
1, the description
This is often the case, the date format of the page is: YYYY-MM-DD, and the date format in the database is: YYYYMMDD, between the two need to convert, you can upload to the Java background query data.
Usually, there are two
This is the example I write out on the side of the study, hoping to help you and study together. The effect is as shown in the figure:
The HTML code looks like this:
Copy Code code as follows:
Image Browsing Tool making
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