There are many places need such functional modules, such as the system log output, GUI application must be a single mouse, modem connection needs one and only need a telephone line, the operating system can only have a window manager, a PC with a
Use JavaScript to take float type two digits after the decimal point, example 22.127456 to 22.13, how to do?
1. The Dumbest way
Copy Code code as follows:
function Get ()
{
var s = 22.127456 + "";
var str = s.substring
This code can verify the mobile phone, mailbox, QQ, telephone, IP, data, Chinese characters, user name legality, mailbox, etc. oh.var fk;var mode;validator={Errinput: ' Errinput ',ErrMsg: ' ErrMsg ',ERRCLS: ' No ',YESCLS: ' Yes ',
Require:/[^ (^s*)
Like many other object-oriented languages, JavaScript also has the This keyword, which is used in a function to point to an object that calls this method. In the actual programming to determine who this is pointing to, you can generally follow the
Copy Code code as follows:
/**//*
Asynchronous Request Class
Author: I am not intentional
Date Created: 2009.2
--------------------------------------------------------------------------------------------------------------- ----------------
The client collects the form information.
Submit to the server using the XMLHttpRequest object.
The server completes the validation logic and returns the result information.
The browser side makes certain prompts to the user based on the information
Because of the influence of JS homology policy, JS can only access documents under the same domain name. So to achieve cross-domain, there are several ways to do this:
First, the way to deal with Cross-domain:
1. The Agent
2.xhr2
The
The main is to rewrite the UserControl and form of the CreateParams method.
The front end calls the UserControl form to write this:
The code is as follows
Copy Code
protected override CreateParams
1. Know Ajax (Ajax operations must run on the server, and not cross-domain, only access to other files under the same domain name)
Ajax basic Format ↓↓
the difference between get and post methods in form forms ↓↓
1.get
Here are some of the ways that JavaScript preserves two decimal places:roundedthe following processing results are rounded:
var num =2.446242342;
num = num.tofixed (2); Output is 2.45
Not roundedthe following processing results are not
1. Select elements
JQuery
var els = $ ('. El ');
Native
var els = Document.queryselectorall ('. El ');
Shorthand
var $ = function (EL) {return
document.queryselectorall (EL);
}
The Queryselectorall method returns the NodeList object,
ajax|asp+| Refresh | no refresh
I do not know on the Chinaren alumni friends have not noticed, chinaren in many aspects after the revision of a large number of changes. For example, the message and reply is no longer like before, after each
Reprint the Source: http://www.cnblogs.com/xiaopen/p/5540884.html Xiao Peng Blog
jquery is just a tool, the raw is knowledge
1. Select Elements
JQuery
var els = $ ('. El ');
Native
var els = Document.queryselectorall ('. El ');
Shorthand
var $ =
Http://www.pdosgk.com/index.php/home/news/show/id/70159.html
To declare a protocol method as mutating
Swift's protocol can be implemented not only by class type, but also by struct and enum. For this reason, we need to think more about using
Application Scenario:
Design a task scheduling system in which configuration information is stored in XML rows in a tasks.config configuration file, with more than one task in the configuration. Different tasks, there will be different
With Internet Explorer 11, you can get better compatibility with web standards, other browsers, and real-world Web sites. Updated support for common WEB standards and added changes that prevent older versions of Web site from being incorrectly
The go language is the second open source programming language released by Google 2009.
Go The language is optimized for programming multi-processor system applications, with go-compiled programs that are comparable to C or C + + code, and are more
1. Stop the database servicesudo service MySQL stop2. Create a Data Migration destination folder (it should actually be mounted on a new hard disk)Cd/var/libLs-ldrwx------6 MySQL mysql 4096 January 9 09:26 mysql/#文件夹权限700, only MySQL users can
Zmodem:Whether you have Xshell or SECURECRT connected to Linux.A zmodem is used by default to help transfer files between Windows and LinuxVery convenient and practical tool.However, the default is not available to install the Lrzsz softwareA direct
This article mainly introduces the use of the this keyword in JavaScript, which is the basic knowledge in JavaScript beginners. You can refer to this keyword in JavaScript, which is the same as many other object-oriented languages, this is used to
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.