After studying jQuery recently, I think it is really a very good js library. The key is to have a detailed document, which is very important. Of course, the Code is also very convenient to use, so you don't have to worry about a lot of things.
In
Several methods used in development are put in the utility directory or utility. js. All the prompts and error messages are put together. It looks like a few steps, but it can make our code colleagues read more smoothly and can be used in the next
I optimized and modified a JS drag class on the Internet, and added the effect of translucent display when dragging. I optimized and modified a JS drag class on the Internet, and added the effect of translucent display when dragging. Http://www.jb51.
We all know that js cannot be used across domains, But we sometimes need to use it like this. What should we do? There is always a method for. js to be cross-origin, you can use:
In fact, I think this function may not be very useful, because I have added this function to my website search bar for two weeks, and no one has found it. A simple function is to use JQuery to display preset keywords when users enter search
Let's take a look at the effect after the execution. Whatever the value of textbox1.text is, the conditional judgment will be applied. Why? Let's look at the code below:
Var a = textbox1.text;
Var B = 5;
If (
{
A = B;
}
Let's see what
Code for moving data between two tables.
function moveIt (obj) {var tableId; if (obj. parentNode. parentNode. id = "t1") {tableId = document. getElementById ("t2");} else {tableId = document. getElementById ("t1");} var newRow = tableId. insertRow (
For document. compatMode, many of my friends may have little contact with me, but they do not know how to use it. The document. compatMode is very helpful for developing compatible web pages. We all know that the rendering of the box model by IE is
JQuery is still very convenient to get the index value of the current element. For example, there are a lot of li resources. When the mouse moves up, do you know the number of li resources? JavaScript code
$ ("Li"). hover (function () {alert ($ ("
Very good application, let the text box can only input money to everyone to see the specific implementation code, really only think of, the principle is very simple.
The Code is as follows:
Select Code for changing the font color.
select a color red blue green [Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
The Textarea control cannot use formvalidate. js to determine the attributes of. Extended textarea. Combined with jquery. validate. js, it also verifies the length of textarea when submitting a form.
1. jQuery plugin for verifying the length of
I have been using js for a long time, but I have never gotten into the js array form. Occasionally, it is a simple string. split (char ). I have been using js for a long time, but I have never gotten into the js array form. Occasionally, it is a
Yanlei uses the jQuery image smooth rolling plug-in (2009.04) in IE6IE7Mozilla5.0 (Firefox3.0.5) to test and pass * this plug-in requires running on jQuery v1.3 or later.
* The plugin allows you to smoothly scroll up or left an image.
* If you need
Every time we use form verification, we are looking for something everywhere, and many of them are useless on the Internet. I finally accumulated these methods. Some of the methods used in my program are certainly easy to use, mainly using simple
Determines whether the character is an ip address or a number.
The Code is as follows:
Function ZQH_isIP (str ){Var arrIP = str. split (".");If (arrIP. length! = 4 ){Return false;} Else {Var I;For (I in arrIP){If (ZQH_isNumeric (arrIP [I]){If
This function is compatible with ie and firefox. In addition, clearSetTimeOut and clearInterval can be used for clearing. Compared with the original setTimeout, setInterval is much more convenient and the parameter can be an object. /****************
This article will teach you how to create an array of all possible entries with simple JavaScript, and then randomly select the images or references you need to add to the webpage. The first step to use this script is to select the Code in the
Use js to control some of the good functions of select. Implementation Code:
The Code is as follows:
Add both text and value Text operations Operate on value View Del1 Del2 Del3
Demo:
Add both text and value operate on text operation
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.