//1 People wrote it, and I took it for reference.functiontitlecase (str) {varArray = Str.tolowercase (). Split (""); for(vari = 0; i ) {Array[i]= Array[i][0].touppercase () + array[i].substring (1, array[i].length); } varString = Array.join ("");
In the daily use of the map process, you will often encounter map labels, cue points and other displays do not meet our needs, need to write JavaScript code.For example, in the process of using the map, you will find that many place names appear to
There are three functions in JavaScript that can encode strings, namely: Escape,encodeuri,encodeuricomponent, corresponding 3 decoding functions: Unescape,decodeuri, decodeURIComponent.Here's a brief look at the difference between them1 Escape ()
toString()function is used toreturns the current object as a string。This method belongs Object to an object, and since all objects have "inherited" an object instance, this method can be used by almost all instance objects.This function is supported
Not only are JavaScript object-based, but browsers are also made up of objects. When JavaScript is running in a browser, it can access the browser's objects in the same way as the built-in objects that use JavaScript. The browser provides a number
Js to achieve the scratch effect on PC and mobile terminals, jspc
The examples in this article share the code for js scratch effect for your reference. The details are as follows:
:
Code:
Xiaoyue blog scratch case sharing receive
Implements a level-2 comment system (like a simplified book) based on Angularjs + mybatis, and angularjsmybatis
I always wanted to write a comment system. I read more about the comments of Netease And jianshu and thought about what kind of comment
Install nodejs environment variable settings in windows and nodejs Environment Variables
You need to set two directories for adding node.exe to path2.C:\Program Files\nodejsAdd the environment variable NODE_PATH with the valueC:\Program Files\nodejs\
Jquery code specifications make the Code look better and better. jquery code specifications
After learning jQuery recently, I feel that jQuery is really good. As he said, I should do less! It feels good to start. However, if you write too much, you
Quick implementation of jQuery multi-level menu effects, jquery menu
You can use js or jquery to quickly implement the multi-level menu Effect of navigation bar.
I use jquery1.9.1 in this Code. The compatibility below ie8 is to be considered, mainly
The paging function example implemented by jQuery, And the jquery paging example
This example describes the paging function implemented by jQuery. We will share this with you for your reference. The details are as follows:
1. Page bar HTML code
AngularJS command encapsulation Back to Top example details, angularjs Back to Top
For more information about how angularJS returns to the top, click code!
1. Build commands,Use registerDirective to build commands and add them to the internal
JQuery Ajax implements cross-origin requests and jqueryajax cross-origin requests
The examples in this article share the specific code of jQuery Ajax cross-origin request for your reference. The details are as follows:
Html code list:
Server
RequireJS dependency instance (recommended) and requirejs instance
Now let's take a look at the neat features of RequireJS:
The following is an html page:
configuration
At most one script statement introduces the require. js file
Six de-duplicated JavaScript Array methods, javascript Array
Method 1
Without thinking, we can get the O (n ^ 2) Complexity solution. Define a variable array res to save the result and traverse the array to be de-duplicated. If this element already
Native js implements the news list to expand/collapse the full-text function, and js News list
Knowledge points
1. The implementation principle is very simple. by clicking the tag, you can set the display attribute of the div to hide or display,
It
JQuery tips and tips
Tips for using JQ:
1. is () method
Checks Matching Element Sets Based on selectors, elements, or jQuery objects. if at least one element matches a given parameter, true is returned. Some small applications are as follows:
list
Vue. js custom command usage and instance parsing, vue. js Parsing
Most of the Articles on Vue. js custom commands on the market talk about syntax and seldom talk about actual application scenarios and use cases. Even if you understand how to write
AngularJS dependency injection instance analysis (using module and injector), angularjsinjector
This article analyzes the dependency injection of AngularJS. We will share this with you for your reference. The details are as follows:
The benefits of
The container component details and instance code in the applet view, and the applet View
Details about the container components in the applet View:
The applet provides three view container components: , , and :
1. view container
is equivalent to
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