Today, we will briefly introduce the Javascript dialog box and status bar.
JavaScript and dialog box:
Three dialog box icons: In the client browser, three common window methods are used to pop up a simple dialog box, which are alert (),
First, list your birthday, for example 1987 12 25.
Then add 1 + 9 + 8 + 7 + 1 + 2 + 2 + 5 = 35
Split the obtained number and add 3 + 5 = 8
The resulting number 8 is the final result. If it exceeds 10, it will be added to the split.
1 kidney
2 eyes
3.
CopyCodeThe Code is as follows: String. Prototype. Trim = function (){
VaR _ argument = arguments [0] | "";
VaR _ Re = new Regexp ("(^" + _ argument + "*) | (" + _ argument + "* $)", "G"); // case sensitive
Return this. Replace (_ re ,"");
}
Supports LRC lyrics, ie only
CodeIt is not encrypted and has detailed comments. I hope it will help my friends who make music pages.
If you have many other players, let me know.
Features of this player:
1. The song address and the lyrics
In JavaScript, mathematical methods can be divided into the following types:Constans (constant), power functions (multiplication function), trigonometic functions (trigonometric function), rounding functions (rounding function), random numbers
Ecmascript can recognize two types of objects: Native object and Host object, which are provided by the runtime environment, for example, document object,
Dom Node
Native objects is a loose structure and can dynamically add properties. All
Note: The following content is based on the GIF onload event in IE, so all tests are ie only
Images to be used
Let's look at a simple fact:
CopyCode The Code is as follows:
If not expected, a large number of alert Prompt Windows should pop
1. var myobject = {};
2. Function myobject ()
{
....
}
3. var myobject = function (){};
For the last two methods, we can also add parameters, which is similar to a constructor with parameters.
For example:
Function myobject (MSG)
{
Alert (MSG
To hide table columns, the most common method is as follows:
CopyCode The Code is as follows: TD. style. Display = "NONE ";
This method is extremely inefficient. For example, hiding a column in a table of thousands of rows takes about 1.4
Translated by Aaron Gustafson and Li songfeng Li yawen. It is definitely a book worth reading. For more information, see. Below are the common JavaScript traps and object concepts I extracted from them. Hope to help you.
Common traps in
ArticleDirectory
Dubbed bubbling)
Event capturing)
DOM event stream
Which events Support bubbling and which events do not?
What is 'easy '?
Event stream
The event stream in the browser means that there may be one or
CopyCode The Code is as follows:
1. Create an object using JSON in Javascript JS CodeCopy codeThe Code is as follows: // create an empty objectVaR jsonobject = {}// Create a new objectVaR jsonobject = new object ()// Create an object that
The day before yesterday, I spent a while and sent an article [one line of code to easily handle the quick message function]. At the same time, I released the quick message function and source code of v1.0beta.
Code The reason for beta is that
1. Math. Min () and math. Max () return the minimum and maximum values of the parameters respectively.
Example:
Alert (math. Min (1, 2, 3) // output "1"
Alert (math. Max (1, 2, 3) // output "3"
2. Math. Abs () returns the absolute value of the
JSON rules are simple: the object is an unordered set of 'name/value' pairs. An object starts with "{" (left parenthesis) and ends with "}" (right Parenthesis. Each "name" is followed by a ":" (colon); "," (comma) is used to separate the "name/value"
When I used JSMin.
Over time, I found it too troublesome! Since we are programmers, why not make things easier?
Therefore, I started to "friendly" JSMin.
In the process of "friendliness", I encountered unexpected problems. I will immediately
1. A brief introduction to JavaScriptMost of the JavaScript mentioned in the internet or books refer to the client JavaScript.JavaScript is a lightweight, interpreted, and object-oriented programming language.Ø JavaScript features1) control the
I can't talk about the translation of "Xin \ YA \ da". I hope I can make a mistake in the article.
Programming traps (gotcha) refer to unexpected document features in computer systems rather than bugs. these traps keep beginners away from javascript
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