Improvement: supports multiple text boxes on the same page. values can be automatically transferred to different text boxes. Let's take a look at the demo first. The principle is also very simple. Similarly, you can use getAttribute to determine the
Javascriptmd5 encryption code, which is different from asp and php encryption.
Script var hex_chr = "0123456789 abcdef"; function rhex (num) {str = ""; for (j = 0; j (j * 8 + 4) & 0x0F) + hex_chr.charAt (num> (j * 8) & 0x0F ); return str;} function
Do not consider JSON as a new application. In fact, JSON is a direct object volume supported by javascript. In JS, we can directly define an object:
The Code is as follows:
Var obj = {name: "blue", age: 10 };
The above is actually the so-called
Because of functional requirements, you need to dynamically create a DIV, which is the original CSS style.
. Item {float: left; overflow: hidden; margin-left: 8px; margin-top: 10px; width: 320px; height:
250px; background-repeat: no-repeat;
Very good calendar Selection control that can be accurate to minutes, so that we can easily select the article modification date, etc.
script function CalendarMinute (name, fName) {this. name = name; this. fName = fName | "m_input"; this. timer =
Some parameters about location used by Javascript drag-and-drop. Some parameters about location are used by Javascript drag-and-drop.
Before reading this article, take a look at the offsetParent attribute of the first Article Javascript
Today, I wrote a Demo for my colleagues to use ExtJs to generate a dynamic tree. I 'd like to share it here for future reference. I. Requirements
A department tree is required to be generated, and only the root department is listed initially.
When
Collect some rare and useful custom function code to calculate the JavaScript function Image Adaptive size function code of the JavaScript function before and after the characters to remove Spaces
Js functions that calculate the character Length
Js highlight effect implementation code, directly Static Page, no need to generate each time
Js highlight Method 1:
The Code is as follows:
ScriptFunction HighLight (nWord ){If (nWord! = ''){Var keyword = document. body. createTextRange ();While (
In IE, we can easily use the following code to set the homepage, but in firefox we need to do more in IE, we can easily use the following code to set the homepage:
Click here to make devdao.com your default homepage! [Ctrl + A select all Note: If
You can test the results that are frequently used in advertisements.
function show_pop () {// display window Document. getElementById ("winpop "). style. display = "block"; timer = setInterval ("changeH (4)", 2); // call changeH (4), move up once
Because asp cookies are url encoded, You need to perform the unescape operation before reading them. Here is how I use regular expressions to retrieve cookies, including single and multi-value values:
The Code is as follows:
/*******************
Recently, I encountered a problem. I need to add a browsing history function for a page, specifically, you need to record the click history of the user on this website and sort them in descending order (only the first six browsing history are
We already know that null does not have any attribute values and cannot get the existence value. Therefore, null. property returns an error instead of undefined. Consider the following code
If (node. nextSibling. className = ...){
...
}
If node or
Some people use JS to redirect websites, and some others use many other cheating methods. Today, many people use this method to share the IP addresses of the two sites, it's easy to replace www.jb51.net with your own website. If you have two sites,
Judge whether all the scripts are Chinese. javascript checks Chinese regular expressions.
Js check if all is Chinese
Chinese JavaScript test script function isChn (str) {var reg =/^ [\ u4E00-\ u9FA5] + $/; if (! Reg. test (str) {alert ("not
Formerly known as SyntaxHighlighter, SyntaxHighlighter is a code coloring tool for Web pages. It can be used to color multiple languages, HTML, CSS, Javascript, C, JAVA, and other programming languages. YUI, which was first seen in Yahoo, was also a
With the rise of third-party browsers represented by Firefox, our Website Cannot Be JUSTIE any more. If we put some original javascript code in a browser other than IE, this section describes how to improve JS to make it more standardized and
I don't know whether there are any standard rules that do not allow you to modify the id attribute, or do not recommend you modify the id attribute. In short, IE does not support this. In IE, modifying the id attribute will not affect future DOM
The ajaxValidator function has an error after submission. When it stays on this page, triggering verification again will keep the prompt content in the onload status.
Bug Description: The ajaxValidator function has an error after submission. If it
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