Mode:
Prototype (original model mode or prototype mode)
Defined:
The original model pattern belongs to the object's creation pattern by giving a prototype object to indicate the type of object to be created, and then using the method of this
Take a look at the code below, what's the last alert?
var name = "Bob";
var nameobj ={
Name: "Tom",
showname:function () {
alert (this.name);
},
waitshowname:function () {
settimeout
Defines two functions, PT output expression and its computed result, put output string:
Debugging Information:
Use case:
The output screenshot is as follows:
How is it, isn't it convenient? To obtain the full
There are only two scenarios for JavaScript variable scopes: global scope, function scope
There is no code block scope, so develop a programming habit of declaring all variables (file headers, function headers).
function test () {
var
The method of a String object:--charat () returns the nth character in a string--charcodeat () returns the Unicode encoding of the nth word a in character creation--concat () connection string--fromcharcode () Creates a string from a string encoding-
imooc.com JS LearningUnderstanding the DOMThe Document Object Model DOM defines a standard way to access and manipulate HTML documents. The DOM renders an HTML document as a tree structure with elements, attributes, and text (the node tree).Let's
1.window Common Properties:①history②locationMethods for 2.history objects:①back ()②forward ()③go ()Properties of 3.location objects:①host ()②hostname ()③href ()Methods for 4.location objects:①reload ()②replace ()Common methods for 5.window
The match () method retrieves the specified value within a string, or finds a match for one or more regular expressions.The method is similar to IndexOf () and lastIndexOf (), but it returns the specified value instead of the position of the
1: triggering and execution is not the same concept, the callback function of the timer must be triggered after the time of the specified delay, but not necessarily immediately , may need to wait. All JavaScript code is executed in one thread, and
Html: Prohibit right-click, prohibit copying, prohibit image dragging, prohibit copying and cutting,
As we all know, the general blocking method is to use JavaScript scripts, but you can also directly modify the webpage attributes to shield
Common HTML attributes and common HTML attributes
-Html Concept: Hyper Text Markup Language (Hypertext Markup Language)
Html Tag classification: 1 dual tag, 2 single tag
Relationship between Html tags: 1 nested Relationship 2 parallel
Fixed on the left, responsive and Adaptive Layout on the right
Responsive layout is only available now. Although the code is simple, there are still some basic requirements.
1. set position: absolute and width: 70px on left, then use margin-left:
New html5 features
1. querySelector returns an element matching the specified css selector in the document.Note: The uerySelector () method returns only the first element matching the specified selector.If you want to return all elements, use
Collation and description of the learning Box ModelThis is my understanding and arrangement after learning. If you have any errors or questions, please correct them and I will keep updating them!
1. the css box model includes the standard box model
Pseudo-class elements implement scalable timeline and Scaling
Requirement: You need to implement a timeline on the left of the vertical list. The timeline is not interrupted except the specific time nodes. Click the icon in the information box on
The difference between id and class in the summary of common css attributes: class or ID ?, Cssclass
In the previous two articles, we talked about the knowledge and usage of class and id, but in actual projects, how should we choose class or id?
Use some new attributes of C3 to draw Google's browser icons and c3 to draw Google's browsers
// Use some new attributes in Css3 to create a Google browser icon
You must know a few CSS skills and CSS skills.
Some of the classic CSS skills need to be remembered, which can save a lot of time. Below we recommend some good CSS skills for you at zero degree:1. Use the same navigation code on different pages
Many
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