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
Basic JavaScript tutorial Arithmetic Operators
Operator
Operator description
Example
Example
+
Addition
X + Y
If X is an integer of 2, Y is an integer of 5, X + Y is equal to 7If X is the string
1.doc ument. formname. Item ("itemname ")
Description: You can use document. formname. item ("itemname") or document. formname. elements ["elementname"]; In Firefox, only document. formname. elements ["elementname"].Solution: Use document.
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
Sometimes there may be such a requirement that I use in the background:
CopyCode The Code is as follows: httputility. urlencode (STR, system. Text. encoding. utf8 );
Encode the URL. The front-end JS needs to use this content. In this case, it
1. typeof operator. For function, String, number, undefined, and other types of objects, it is fully qualified, but for Array
CopyCode The Code is as follows: var arr = new array ("1", "2", "3", "4", "5 ");
Alert (typeof (ARR ));
You will
Example
This page is an example. Click a paragraph, edit it, and click ready. Your modifications will be displayed.
ProblemThe first problem I encountered was: I want to use a text box as the editing area. At first, I did not put the content
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
First, let's create an experiment.
Open a blank page in any browser and enter the following code in the address input column:
Copy codeThe Code is as follows: javascript: void (3 );
What will happen?The answer is nothing happens.Then, open a blank
The developed functions mainly involve the Real-Time Code coloring and syntax prompting functions. Later, we will summarize the issues in feature development or provide the source code.The following is an example of my understanding of Range objects
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