Chinese New Year has been relatively busy, let everyone down.
Learn the function today, although the statement has not finished.
Functions are a very important part of the JavaScript language, but they are also complex.
Here's a look at JavaScript
Rarely used the split method before, today to find some information.
How to use: Myarray=string.split ("|")
Description: "|" To cut the character character, string is the string to be cut, myarray is the result of the cut (stored in an array), and
View free Bodhisattva line Deep Blessings Encounter five aggregates degrees all the bitter Relic sub- color no different null Null color is both empty null is both the color to the general knowledge of the " " is also the same as
Description: IE6.0, IE7.0, IE8.0, firefox/3.0.11 under the test pass
Verification Number simplest regular expression Daquan Input After the press RETURN can be verified! (Consider yourself the simplest!) positive integer: Negative
JavaScript often validates Chinese, offering two examples:
JavaScript code:
Copy Code code as follows:
/**
*a Simple Example
*/
function Ischinese (temp) {
var re =/[^u4e00-u9fa5]/;
if (re.test (temp)) return false;
return true;
}
/
In the last lecture we learned where JavaScript appears and what it looks like. Now we begin to learn the language. In this lesson we'll learn how JavaScript stores information, how to make decisions based on information, how to alternate pictures
Netizen Wys Questions: How to use only regular syntax supported by JavaScript to
Copy Code code as follows:
between ... is replaced by ?
Thinking
One of the difficulties with this problem is that the regular
This is the screen object for basic JavaScript
The screens Screen object reflects the screen settings for the current user.
Width returns the size of the screen (the number of pixels).
Height returns to the screen heights.
Availwidth returns
JS Implementation keyword highlighting
A once had a sincere love to worship in front of me, obviously I was asleep ... Life is so damn sad, boil it, there is always a day the future would be bright!
[Ctrl + A All SELECT Note:
JavaScript has its own set of this mechanism, in different cases, this point is not the same.
Global scope
Console.log (this); Global variables
The global scope uses this to point to the global variable, which is window in the browser
In the recent project, I need to do a time, that is, when the user leaves the page, I need to cache part of the content of the page, but I do not need users to refresh the time also cached, I just hope that when my users leave
Execute this function.
How to obtain browser information
Window has a navigator object that lets us know all about the browser. We can use a series of API functions to learn about the browser's information.
The JavaScript code is as follows:
复制代码 代码如下:
What does this in JavaScript really mean? A lot of people will tell you this is the current object. Is that understandable, right? In most cases it is true. For example, we often write JavaScript on the Web page:
This here obviously
AddEventListener () methodInstanceClick the button to trigger the listener event when the user clicks:
document.getElementById ("Mybtn"). AddEventListener ("click", Displaydate);
The AddEventListener () method is used to add an event
Timing of events and browser recognition
As we have more and more javascript in our hands, we can produce more and more complex applications. In the last course we learned how to use javascripts to write cookies. Today we will learn how to add
Now you've learned the basics of computer programming. We'll go on to look at the Document Object Model (MODEL-DOM). The click relationship of the DOM begins with the Window object, which is a Document object in each Window object. We'll focus on
In the JSP to take the ${pageContext.request.contextPath}, way one can be normally taken, but the way two but take the
Character " ${pageContext.request.contextPath} "
Mode one:
jqgrid.js:
function Jqgridinclude ()
{
var t = '
jquery Learning with JavaScript (get parent-child elements) first second parent
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
This article shares a small JavaScript case that mimics the effect of a microblog input box.
Effect Chart:
Code:
Imitation micro-blog input box effect
You can also enter 140 words
The above is a small set to introduce the
Author: Yin Wei-ming
blog:http://my.donews.com/yinwm/
As my previous article says, for JavaScript, a class is a function, and his class method (that is, static) is part of the function, and the instance method is above the prototype.
function
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