The substring () method and slice () method in the string class are described in section 2.8.4 of this book. The method and return result are basically the same, as shown in the following example:
CopyCode The Code is as follows: var strobj = new
Basic concepts of javascrpit:
1) Case sensitivity is the same as that of Java. variables, functions, operators, and other things in JS are case-sensitive. For example, variables mytag and mytag are two different variables.
2) weak type changes.
As JavaScript has become more and more widely used in recent years, and the sliding effect is everywhere, I have followed suit and made the stick function a slide effect. later, in order to better fit the physical characteristics, the sliding effect
2.1 select an appropriate editing tool
1. notepad 2. Ultra Edit32: There are keywords for key Liao coloring and automatic correction. 3. EditPlus: the browser is embedded in its own window, allowing you to view the web page effect at any time.
1.1 omitted
Version 1.2. Omitted
1.3 javascript and browser
1.4 javascript Functions
From 3 Cschool
What can JavaScript do?
JavaScript provides HTML designers with a programming tool.HTML creators are often not programmers, but JavaScript is
Parameters
Type
Description
El
Element
Required. It is a page element.
Begin
Number
Required. the start position.
Change
Number
Required. The distance to be moved.
Duration
Number
1. jQuery-Javascript Framework
JQuery is the most popular JavaScript framework, which simplifies HTML document traversal, event processing, animation, and Ajax interaction.
2. Dojo Javascript Framework
The powerful core of Dojo makes Web
Copy codeThe Code is as follows: var YX = {
// Obtain the JS built-in data type. The returned values include [Date, RegExp, Number, String, Array, Boolean, Function, null, undefined, Object].
GetType: function (obj ){
Return obj = null? Obj + "":
This time, the organizational structure of the original code is used to re-enhance the function. Currently, there are two other small issues. The first one is that the custom pop-up layer in ie6 will not be able to cover the select, currently, it
Magnifiers are not hard to achieve. They are complicated because they involve some precise numerical calculations. in the future, I will occasionally write articles about the JavaScript magnifier series. Each time I talk about a dot, a dot and a
For JavaScript magnifiers, the computing rate is essential.
In a complete magnifier structure, there are a total of four objects related to the magnification, the source image, the thumbnail, the lens and the window. the lens's coverage on the
I have used Java and. NET users should be familiar with the concept of the package or namespace. Because of this concept, the code is concise and easy to read. I don't know how to locate the with statement at the beginning of JavaScript design. I
Java also has the Integer. parseInt () method, but the parseInt Processing Method of JavaScript is not the same as that of Java and other strong Integer languages. Therefore, some people often get an exception because of improper use of this method.
When using object-oriented programming, the inheritance relationships between objects are indispensable! Prototype is an important method to implement javascript inheritance!
Let's take a look at the following code:
Copy codeThe Code is as follows:
Frequently Used metacharacters include:
• Find a single character, except for line breaks and line Terminators;
• \ W matches letters, Chinese characters, numbers, and underlines;
• \ S matches blank characters (including spaces and tabs );
• \ D
Some html code:
When you click show, The showValue function is triggered to dynamically Add the value of input value to the element node id = "text!
Copy codeThe Code is as follows:
Javascript code:When a page is loaded, the input
1. There are no events (such as click and mouseover) in IE6, IE6, 7/8, and ie9, while Firefox, Safari, Chrome, and Opera do.
Copy codeThe Code is as follows:
1
2
Example:
12
2. Click option and use srcElement to obtain the event source target.
(Forget whether both mailboxes have this function ).
How does this function work?
Timing, we know how to get it, but what about saving it? Maybe we can store data by hiding domains and other means. However, this has a disadvantage: After the page
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