Tip: You can modify some of the code before running
JavaScript pure JS Picture ad rotation effect [support IE7,IE8.FIREFOX,IE6] Untitled document
Tip: You can modify some of the code before running
First look at the effect of the following example: Principle:How do I get the "enter" to move the focus of the text box down one after another? Of these three methods, the best one is this: Using client script to add the document's onkeydown event
When you want to show more information in a limited space, we often take the mouse to slide over the pop-up more relevant information layer to improve interactivity. Especially can be applied in the company photo wall, recruitment site job seekers
Let's take a look at an example
Sometimes we need to save the user name with a cookie, record the login status, and how to correctly determine if the user cookie exists? You can't simply use the a!= ".
The code is as follows
Copy
"Instance Name"JS implementation file Upload one-time completion"Instance description"The default HTML control file can upload files, but must go through the selection file and click the Upload button two steps. This example learns how to implement
Ways to define regular expressionsThere are two ways to define a regular expression: the constructor definition and the regular expression direct quantity definition. For example:
The code is as follows
Copy Code
var reg1
Create a link label with JQuery
If you like to use jquery in your development, then using jquery to create the link tag should be like this:
The code is as follows
Copy Code
var cssurl = '/style.css ',Linktag = $ ('
The drag of a DOM node is a simple JavaScript effect, often called a drag-and-drop, that is, Drag-and-drop.
Drag and drop mainly involves three processes:
Click on the object you want to drag and drop to record the mouse relative to the drag
Before I was a JavaScript little white, the understanding of jquery was limited to the use of basic functions. I've been reading "JavaScript DOM programming Art" for a little bit of basic knowledge. There is a function in the instance that needs to
window.open encapsulation to make it better, and more compatible, many people say window.open incompatible, in fact, because can not be directly executed, must be triggered by the user manually; see Code:
The code is as follows
Copy
The code is as follows
Copy Code
^[wu4e00-u9fa5uf900-ufa2d]*$
1, a regular expression, contains only Chinese characters, numbers, letters, underscores can not be the beginning and end of the underscore:
The
The quickest way to JS
JS Code:
The code is as follows
Copy Code
function getquerystring (name){var reg = new RegExp ("(^|&)" + name + "= ([^&]*) (&|$)");var r = window.location.search.substr (1). Match (REG);if
JavaScript Tutorial e-mail address verification Program
Validateemail ()
Next we want to see the email address if the user input is true. This means that the input data
Must contain at least one @ symbol and one point (. )。 In addition, @ must
JavaScript Tutorial Password Validator
The following check function, the password field is blank, only allow letters and numbers-this time no underscopes. Therefore, we should use a new regular expression to prohibit underscopes. These 1/[w_]/Only
This is a used to filter some illegal characters on the client, you can prevent some unnecessary offers, but also appear user-friendly tips oh
JavaScript Tutorial filter Illegal character validatorjavascript Filter Illegal character Verification
Tip: you can modify some code before running 3D spherical label cloud-miaowei class-www.miaov.com JS course trial excellent flavor class SEO special effect JavaScript miaov CSS job interview questions inherit the magic flavor class oop
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