1. Set and get special attributesSetAttribute ("Score", 10); set some DOM element property name Special propertiesGetAttribute ("score"); Gets the value of the Set property2. ExampleExample: Pentagram Scoring SystemStatic score javascript
If you ask the beginner JS what is more difficult to understand, many answers will be the This keyword. This is different from the different scenes of the object, there is a confusing feeling, Buddha magic is generally mysterious: what is this?
What can JavaScript do?Give the page soul, so that the page can move, including dynamic data, dynamic tags, dynamic styles and so on.such as the implementation of the Carousel diagram, drag, magnifying glass, and so on, and dynamic data is like not
Today into the JS stage, understand that JavaScript is a very important stage, so we have to clear every point of knowledgeUse of javascript: Apply in tags var: syntax var age=18; var name= "Xiao Qiang" calls two of which is not
This article is also mentioned before, is purely boring, MO want to take offense. ~ (~ ̄▽ ̄) ~ ~ (~ ̄▽ ̄) ~ ~ (~ ̄▽ ̄) ~ ~ (~ ̄▽ ̄) ~ ~ (~ ̄▽ ̄) ~As mentioned above, if all the prototype properties point to an identical object, the parent object is affected
This article is from the "Hbbdgyb" blog, make sure to keep this source http://hbbdgyb.blog.51cto.com/5031387/1844851JavaScript Click to change background
Regular expressions are a set of independent rules that almost every programming language provides classes that implement these rules1. Create a regular object in two waysThe first method of creation:var reg = new RegExp (pattern,flags);Second
(1) In the function body, the arguments array object can be used directly, and the elements of this array are all arguments actually passed in when this function is called(2) In fact, when calling a function, the number of arguments passed in can be
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 observer pattern is also called the Publish-subscribe pattern, which defines a one-to-many dependency between objects, and all objects that depend on it will be notified when the state of an object changes. In JavaScript, the event model is
1. Scope and scope chainIn JavaScript, a function is also an object. For a function, each context object that can be accessed by the function is called the scope of the function. All properties and methods in the scope can be accessed by the
One, object reference type the first way of writing: var obj1 = new Object (), Obj1.name = "Zhang San"; obj1.sex = True;obj1.age = 18;alert (obj1.name); alert ( obj1.sex); alert (obj1.age);Object reference type the second way of writing: var obj1 = {
varMyDate =NewDate (); Mydate.getyear ();//get Current year (2-bit)Mydate.getfullyear ();//Get the full year (4-bit, 1970-????)Mydate.getmonth ();//Get the current month (0-11, 0 for January)Mydate.getdate ();//get current day (1-31)Mydate.getday ();
Understanding JavaScript Scoping & Hoisting (ii)Transferred from: http://www.jb51.net/article/75090.htmThis article focuses on understanding JavaScript scoping & hoisting, Although it is a piece of cake for experienced programmers, but I still
CSS3--3D rotation diagram (lawn lamp), css3 lawn lamp
CSS3 has added many new attributes that can use a small amount of code to achieve cool animation effects. However, due to the lack of compatibility with various browsers, websites with special
A wonderful use of Javascript callback Functions
Preface
In fact, a callback function is a simple and popular function. When a is passed to B as a parameter and executed in B, a is a callback function, if a is an anonymous function, it is an
For the quick solution to dynamically add select in jquery and the event is invalid, jqueryselect
Recently, the jquery1.6.2 library is used for projects. When div and select are dynamically added, the event does not work.
I checked some information
Sass-maybe you want to play with CSS (next), sass-cssHave a clear conscience and mutual encouragement!Sass-maybe you want to play with CSS (Part 1)
The previous article mainly introduced some basic sass features. In the next article, we will mainly
Meta tag, meta
1. viewport
(1) width controls the viewport size. You can specify a value, such as 640 or a special value. device-width indicates the width of the device (unit: CSS pixels scaled to 100% );
(2) initial scale ratio of initial-scale,
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