This article mainly introduces the use of the toLowerCase method in js, and analyzes how to use the toLowerCase method to convert lowercase letters. if you need it, refer to the example in this article to describe the use of the toLowerCase method in js. Share it with you for your reference. The specific analysis is as follows:
Definition and usage:
The toLow
This article mainly introduces the example code of a rolling effect to the right of a js image. If you need it, refer to the example below.
Style
The Code is as follows:
# P_left {float: left; width: 60px; height: 86px ;}# StarScroll {width: 843px; height: 188px; margin-left: 15px; margin-right: 15px; padding-top: 9px; overflow: hidden; border: 1px solid red;
For example, obtain the JSON data var nbsp; newValue nbsp; {1051431: 1569: 0}; var nbsp; itemnum nbsp; arrValue [0]; alert (newValue. itemnum); in this way, undefined is printed. for example, the question is to get the data in JSON in JS.
Var newValue = {"1051431": "0", "1051569": "0 "};
Var itemnum = arrValue [0];
Alert (newValue. itemnum );
Print th
Using JS to write a small example, to achieve a click on different tags appear different content:1 DOCTYPE HTML>2 HTML>3 Head>4 MetaChaset= "Utf-8">5 Script>6 functionnav (obj, x)7 {8 vara=Obj.parentNode.parentNode.children;9 for(varI=0; IA.length;i++) {Ten A[i].style="border:1px Solid Red"; One } A Obj.parentNode.style="Border-bottom:white;"; - varDiv=Document.getelementsbyname ("Div"
Example of js simple factory mode usage
The example in this article describes the simple js factory mode usage. Share it with you for your reference. The specific implementation method is as follows:
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
JS Buffer Motion code example:Elements of the buffer movement is more beautiful than uniform motion, because it appears more tension and elasticity, of course, for the browser may have a better effect, then the possibility of retaining users is even greater, the following code examples of how to achieve this effect.The code example is as follows:DOCTYPE HTML>HTML>Head>MetaCharSet= "Utf-8">Metaname= "Author"
This article mainly introduces the use of JS event listener, in the form of examples to analyze the JavaScript event listener usage precautions and related skills, the need for friends can refer to the followingThis example describes the JS event listener usage. Share to everyone for your reference. The specific analysis is as follows:
1. When the same obje
This article mainly introduces the example of JavaScript Backbone. view view in the js framework. In the browser-side js framework backbone, we use View to bind and handle DOM events, you can refer to the View in Backbone to reflect the Model in your app. They listen to events and respond accordingly.
In the next tutorial, I will not tell you how to bind the Mode
This article mainly introduces jQuery's method for parsing json format data, and analyzes the techniques for parsing json format data using jQuery1.7.2 in combination with examples, for more information about how jQuery parses json data, see the following example. We will share this with you for your reference. The details are as follows:
The jquery version I used is 1.7.2, which integrates the json data parsing function. It was not available in ea
Example of js toLowerCase method usage and jstolowercase
This article describes how to use the toLowerCase method of js. Share it with you for your reference. The specific analysis is as follows:
Definition and usage:
The toLowerCase () method is used to convert a string to lowercase.
Syntax:
StringObject. toLowerCase ()
Return Value:
A new string in which
Js example code for efficiently removing array repeated Elements
Articles on how to use js to remove repeated array elements have been introduced before. The following is a good example. If you are interested, refer
The Code is as follows:
Function unique (data ){
Data = data | [];
Var a = {};
For (var I = 0; I
Example of using the settimeout method and parameters in js
This article describes how to use the settimeout method and parameters in js. For more information, see
W3school for simple use
There is no parameter call,
Example:
The Code is as follows:
The problem I have now is that only the last one is passed back
IE below JS save a simple example of a picture
function Iesave ()
{
var img = document.images[0];
var opop = window.open (Img.src, "", "width=0,height=0,top=5000,left=5000");
for (; OPop.document.readyState!= "complete";) {
if (oPop.document.readyState = = "complete") break;
}
OPop.document.execCommand ("SaveAs");
representative, odd is male, even number is female.
18-digit ID number:
7th, 8, 9 and 10 are the year of birth (four digits),11th, 12 is the birth month,13th, 14 representatives of the date of birth,The 15th and 16 digits are sequential codes,The 17th digit is representative, odd is male, even number is female.The last one is a check digit.
Four, JS code example
var idcardnoutil = {* * province, th
JS to determine whether the login username and password is empty simple example
PS Call if the table is monotonous use that is
The above JS to determine the login username and password is empty Simple example is a small series to share all the content, hope to give you a reference, but also hope tha
The HashMap is a very common, widely used type of data. This article through the example code to introduce the relevant knowledge of JS HashMap, the specific code content as follows:
/** * Map object, realize map function * Interface: * Size () Get the number of map elements * IsEmpty () to determine whether the map is empty * Clear () Delete all elements of the map * put (key, value) to add to the
I have changed the example of others, I think this is more compact to write! In other words, when a DOM object contains a reference to a JS object (for example, an event Handler), and this JS object holds a reference to this Dom object, a circular reference is made, and a memory leak occurs under IE. Click "Run Code" a
parameter ID it receives indicates the ID of the product. The example is a product with an ID of 32068:
Copy Code code as follows:
This way, you can use Arrorders to get all the items you want to buy on the checkout page or the Shopping Cart browsing page.
The framework can divide a page into functionally independent modules, each module is independent of each other, but can be linked through the reference of Window objects,
JS encoding text involves 3 functions: Escape,encodeuri,encodeuricomponent, corresponding 3 decoding functions: Unescape,decodeuri,decodeuricomponent
1, transfer parameters need to use encodeURIComponentSo that the combined URL will not be truncated by special characters such as #.
For example:
2, the URL jump can be used as a whole encodeURI
For example: L
js/javascript Code Annotation specification and Example
Note the importance of coding in the process, write code more than half a year can be deeply realized. Code that is not annotated is not good code. For others to learn, at the same time for their own later on the code to "upgrade" to see Js/javascript Code annotation specifications and examples. From: http:
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.