Javascript cross-origin is one of the most common problems for web developers. The so-called js cross-origin problem refers to the Access to Data Objects in another different domain through js on a page in one domain. For security consideration,
When reading the following code, we will find that all the Dom operation functions call the domManip function.
Append: function (){
Return this. domManip (arguments, true, 1, function (){
This. appendChild ();
});
},
Prepend: function (){
Return
Another way to avoid invalid data is to block invalid input when users enter data. For example, when users enter bank card numbers, users must enter numbers, if you enter a non-numeric character, a prompt is displayed.
The following code is provided:
InnertHTML is the w3c standard specification, which can obtain content including tags.For example:Aaa dadsa Alert (document. getElement ("d"). innerHTML );Display:Aaa dadsa InnerText and IE are not supported. You can remove the html Tag and retrieve
In JavaScript, The toString () method and the alueOf () method are used to convert an object to a basic data type or string. When converting an object to a string: 1. Call the toString () method of the object to convert the object to the returned
IDValidate. js
/*** ID card 15-bit encoding rule: dddddd yymmdd xx p* Dddddd: Location Code* Yymmdd: Date of birth* Xx: sequence class encoding, which cannot be determined* P: gender. The odd number is male and the even number is female.* * ID card 1
// Html
Register.html
User Registration User name: password: Confirm Password: ID card number: phone number: Email: enter the user name enter the password enter the password again enter your id card number enter the
BasicsJavascript: ObjectObjects we have briefly introduced before. They are a type of object that aggregates multiple data values in one unit and uses names for access. They are a disordered set of attributes.1. Several ways to create objectsVar
[Javascript]// JavaScript DocumentVar checkObj = {/** data verification class **/CheckFunc :{}, // set of function objects for data verificationErrorMessage: [], // error messageRightMessage: [], // correct messageShowInfoFunc :{}, // function for
In jquery, the operations of various controls on the cyclic page are often used. The commonly used cyclic operations are as follows:
// All div labels whose id starts with weiguo _ on the cyclic page
$ ("Div [id ^ = weiguo _]"). each (function
What is AutoComplete and use cases?AutoComplete: the AutoComplete Automatic Filling control of the text box, similar to the function provided by the Google search input box. Why is there such a function, because users are very lazy? Autocomplete,
Introduction to jquery. validate
I haven't written JavaScript for several years, and the data is slowly organized and the format is also messy.
Mainly divided into several partsJquery. validate basic usageJquery. validate API descriptionJquery.
When filtering, we can find the jQuery object corresponding to a dom object from the jQuery object that contains one or more dom objects.1,$ ("P "). eq (-2) Select the jQuery object corresponding to the last and second p elements from the searched p
Recently, some of the differences have been discovered in Javascript research. It is a bit speechless, for example:
Alert (typeof (NaN = NaN); // The result is false.
Alert (typeof (NaN! = NaN); // The result is true.
Hey, of course, this article is
Today's blog post focuses on the encapsulation in javascript. The content of this article comes from "pro javascript design patterns" (if you are interested, you can go directly to the next article) and your understanding of this issue.This article
// Inheritance in javascript-first Inheritance Method: Object impersonatingFunction Parent (name){This. name = name;This. getInfo = function (){Document. write ("Father's name is:" + name + " ");}}Function Child (name, age){// This is the most
Javascript Object-Oriented Programming (II): inheritance of Constructor Author: Ruan YifengThe first part of this series describes how to "encapsulate" data and methods, and how to generate instances from prototype objects.Today, we will introduce
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