1. Respect for object ownership? Do not add attributes for instances or prototypes;? Do not add methods to instances or prototypes;? Do not redefine a method that already exists.the best way to do this is to never modify the objects that are not
Implement chained invocation pattern by imitating jquerySometimes we need to call the method in a row like jquery, and this is what we're going to use. var Deng = { smoke:function () { console.log ("smoke,cool!!"); return this;
+: addition of operator; connection stringAddition will automatically convert other types of values to strings, and then join operations!1 varA=1+2;2Console.log (' First: ' +a);3 vara=1+2+ ' 3 ';//calculate the 1+2 first and then connect to the ' 3 '
Http://www.jb51.net/article/48465.htm1. Converting numbers to stringsA. To convert a number to a string, simply add an empty string to it:Copy CodeThe code is as follows:var n = 100;var n_as_string = n + "";B. To make a number more explicitly
Array method: First, the array method has an array-prototype method, and there are methods that inherit from object objects. This is only a detailed description of the array's prototype method.(1) Join: Put all the elements in the array into a
The Confirm () method is used to display a dialog box with the specified message and confirmation and Cancel buttons.If the visitor clicks OK, this method returns True, otherwise false is returned.GrammarConfirm (str);Parameter description:STR: The
Inadvertently see fill this method, some puzzled, at first thought is someone else's custom method, later discovered that originally is not, JavaScript inside is really has this method, therefore specially studied under.The fill () method is used to
NodeListThe NodeList instance object is a class array object whose members are node objects, including the ChildNodes and Queryselectorall () method return valuesA dynamic collection is a change in the DOM structure that can be automatically
Using JavaScript in HTML elementsThe main way to insert JavaScript into an HTML page is to use the element. defines the following properties:
type: Optional. Represents the content type (also known as the Mimi type) of the Footstep
Note: In JavaScript, the "." After the number The meaning of the operator is not deterministic. Because it can be either a floating-point flag or an operator that takes an object's properties. But the JavaScript interpreter took him as a sign of
In JavaScript, objects are data that owns properties and methods, which are values associated with an object, by actions that can be performed on an object. JavaScript implements object-oriented programming in a way called prototypes.
Full-screen scrolling demo/swiper fullpage footer and swiper4swiper with header and footer implemented by swiper4
Full-screen scrolling demo with header and footer implemented by swiper4,
Fullpage-Swiper header
Based on the Vue framework, the vux Component Library implements the pull-up and refresh function, and vuevux
Recently, the company has been developing an app and selected a vux Component Library Based on the Vue framework. It summarizes the
Vue2.0 user permission control solution, vue2.0 permission Control
Vue-Access-Control is a front-end user permission Control solution based on Vue, Vue-Router, and axios. It controls the routing, view, and request layers, this allows developers to
JavaScript Asynchronization for reading to Tom, and javascript Asynchronization for Tom
One day, I suddenly wrote a method to call data from the background, which is displayed on the foreground page. However, the output result is always empty and
Use vue router-link to PASS Parameters and use the instance, vuerouter-link
1. Path:Http: // localhost: 8081/#/test? Name = 1
jump (id is a parameter)
Use: this. $ route. query. id
2. Path:Http: // localhost: 8081/#/test/1
jump (Id is a
Vue component parent-child communication (3), vue parent-child
The example in this article shares the code of the vue component's parent-child communication for your reference. The details are as follows:
3. Communication between components ($
Notice on the mint-ui loadmore component, mint-uiloadmore
As follows:
LoadTop () {this. $ store. dispatch ('getnewslist', {channelId: this. id, page: 0, size: this. size}); this. $ refs. loadmore. onTopLoaded ();},
For example, when performing a
More examples of rolling loading in vue and vue rolling Loading
In the previous age of cutting-edge farming, we wanted to implement rolling loading more quickly. In vue, we had a little trouble. I recently studied it and made a simple demo, for your
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