concatCombines text of two or more characters to return a new string.var a = "Hello";var B = ", World";var C = A.concat (b);alert (c);c = "Hello,world"indexOfReturns the index (from left to right) of the first occurrence of a substring in a string.
Why is this so endless? We wrote this when we created the object using the prototype + constructor blending mode.function Person (name,age) { this. name=name; this. age= age;} Person.prototype.sayName=function() { Console.log (this. name);}
JavaScript output:
JavaScript displays data in different ways:(1) Windows.alert () Pop-up warning box;(2) document.write () writes the method to the HTML document;(3) innerHTML write to HTML element; display mode First paragraph
Basic
Follow me on JavaScript elevation 3 first: Chapter 1th to 3rd课程制作:bling,兴哥,5年Java,3年前端课程知识:JavaScript、Html、Css课程目标:前端体系课程,逐步深入,找到一份前端工作 课程大纲:本书目录结构适合人群:前端初学者,可以0基础,但要认真,踏实Answer a few questions
1, why to learn the front end? What are the
1, Factory mode;Factory mode is a well-known design pattern in the field of software engineering, which abstracts the process of creating concrete objects (other design patterns and their implementation in JavaScript are discussed later).
Original:http://blog.csdn.net/talking12391239/article/details/21168489JavaScript is single-threadedBecause JS runs in the browser, is single-threaded, each window a JS thread , since it is single-threaded, at a certain time only the specific code
When using reactnative for development, our engineering is modular and structured. In npmjs.com hundreds of thousands of libraries, most of them follow the COMMONJS rules. The concept of class was introduced in ES6, and JavaScript can be programmed
Because of the network reasons, so write half hurriedly sent ...The book is connected to theSince the factory pattern creates objects that are not of any type, we know that JavaScript does not actually have the concept of classes (class), so we need
Note Contents Map:Elements object (Element object)
To manipulate the element object, first obtain the element (obtained using the corresponding method in document)
The method inside the element
GetAttribute ("Property name"): Gets the
ECMA-262 defines an object that is a collection of unordered attributes, whose properties can contain basic values, objects, or functionsIt's plain to wrap a specific set of variables and methods.So let's start by creating an objectvar person=New
First, the browser's JS engine is single-threaded, and performing a time-consuming operation must hinder the execution of the thread's subsequent code (such as waiting for a response from the network request). Some languages solve this problem by
It's mostly handy for your JavaScript. You can see what you're outputting in the page.His advantages compared to alert are:
He can see the structure of things, if it is alert, fade out an object is [Object Object], but the console can see the
/*@@ 截取 string length, Chinese characters count 2 characters @ @return [string]+ ' ... ' */var subString = function (str, len) { var newlength = 0;&nb Sp var newstr = "; var Chineseregex =/[^\x00-\xff]/g; var Singlechar =" "; VA R
BOM model; window (the core of the entire BOM): History, document, location.BOM can be implemented 1. Pop up a new browser window 2. Move, close, and resize the window 3. Page forward, backCommon Properties: History (attribute name); Information
2.1 " string cannot appear in the code and needs to be split into "".Using the element to include external JavaScript files, the value of the SRC attribute points to a link to an external JavaScript file, which can be a file on the same server as
1. You can first define a function for the JS array object to find the position of the specified element in the array, that is, the indexArray.prototype.indexOf = function (val) {for (var i = 0; i if (this[i] = = val) {return i;}}return-1;}2. Then
String problems are often encountered in JavaScript, but it can be cumbersome to stitch strings too long.If it is in a row, the readability is not said, if you want to change the line, will directly error.Here are some tips on how to stitch strings
CSS Web security font combination and CSS Web fontCommon font combinations
The font-family attribute is the name of a variety of fonts, as a "strain" system, to ensure maximum compatibility between browsers/operating systems. If the browser does not
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