The main reference is the "JavaScript Advanced Programming (Third Edition)" This book, according to their own understanding, made the following recordInheritance is the concept of object-oriented (OO) language, and there are two ways of inheriting
function set_text_value_position (obj, spos) {var tobj = document.getElementById (obj); if (sposJavaScript sets the position of the input edit box cursor
Preface: Recently in a date selection function, in the date of conversion often to Halo, summed up the use of commonly used date objects, to facilitate the future direct view using ~1. The new Date () is used in the following ways:
GrammarStatement expressionA sentence is a set of words that expresses a meaning completely, consisting of one or more phrases, between them connected by punctuation or connectives. Statements are equivalent to sentences, expressions are equivalent
Reproduced:http://blog.csdn.net/teresa502/article/details/7926796Code://Delete duplicate data in an arrayfunctionRemoveduplelem (array) { for(vari=0; i) { for(varj=i+1; j) {if(array[i]==Array[j]) {Array= Removeelement (J,array);//Delete the element
a grammarCase-sensitive, camel-writing style;Strict mode: "Use strict"; Two data typesA. Basic data type:Undefined declaring variable not initializedNull empty pointer, can free memoryBoolean
Boolean
True
False
Introduction to JavaScriptJavaScript, a literal-translation scripting language, is a dynamic type, a weak type, a prototype-based language, a built-in support type. Its interpreter? Called JavaScript engine, is a part of the browser, widely used in
Get the key name of the object:var arr={a:12,b:34,c:534,d:3344}; var srr=[]; var i=0; for (var in arr) {srr[i]=items;i++;} // srr=["A", "B", "C", "D"];jquery Action Cookie$.cookie (' name ', ' value ', {expires:7, path: '/', Domain: ' jquery.com ',
The original Published time: 2008-10-11--from my Baidu article [imported by moving tools] Show Time if the browser does not jump, click here --------------------------- Show Time if the browser does not jump, click here Countdown browser Jump
Quick Sort JS Code implementationThe idea of "quick sorting" is simple, and the entire sequencing process takes only three steps:(1) In the dataset, select an element as the "datum" (pivot).(2) All elements smaller than "datum" are moved to the left
JavaScript full-width character to half-width (the contents of the input box with the parameter str)var $fullChar 2halfChar = function (str) { var result = '; for (var i = 0; i Gets the Unicode encoding of the current character
Javascript:alert (document.body.clientWidth); Web page visible area width (body)alert (document.body.clientHeight); Web page Visible Area high (body)alert (document.body.offsetWidth); Web page visible area width (body), including border, padding,
Look at two questions first:The first question why a && b returns is True,b && a returns 61 var user = 6; 2 var true ; 3 4 console.log (user && both); // true 5 Console.log (both && user); // 6The second question both to self-subtract the last
Adapter mode (Converter surface mode), usually for the interface to be used, does not conform to the application or the use of this system, and the need to introduce the intermediate adaptation layer class or object case.The role of adapter mode is
1. Turn the rounding into a numerical type:1 console.log ("10.340" |); 102 Console.log ("10.560" ^0); 103 Console.log ( -2.25|0); -24 Console.log (~~-2.25); -22. Date to Value: var d = +new Date (); 1499149
CSS advanced Selector
The following example describes how to use nth-child, first-child, last-child, nth-of-type, first-of-type, and last-of-type.
Sample Code:
CSS advanced selector Item 1 Item 2 Item 3 Item 4 Item 5 Item 6
[Css] mainly block elements, inline elements, and elementinlineInline element: It takes effect only within the row. Setting the width and height does not affect the text content or wrap the text. The vertical direction and spacing do not work either.
Three methods for uploading and previewing images and three methods for previewing uploaded images
On the common user registration page, you must select an image as your profile picture and preview it at the same time.
There are two common ideas:
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