For front-end development, you must learn to be stingy: 1. Use the least code to do the most appropriate thing;
For example, if you use document. getElementById () in your code, do you want to write a simple ID selector?
The Code is as follows:
Implemented Using Jquery. The original code only supports IE. Here I have changed it. There are three versions in my code that implement Author: shaoyun
Email: shaoyun (at) yeah.net
Date: 2010-03-10
Blog: http://shaoyun.cnblogs.com/
Implemented
I haven't written an article for a long time. During this time, I have been doing an application and data collection similar to fresh fruit, and I am also thinking about the growth of enterprises and individuals. Some time ago I wrote an article
If you use firebug to view the image, you will find that when you scroll to the corresponding row, the image of the current row is loaded instantly. In this way, the page will open images in only visible areas, other hidden images are not loaded,
Table is one of the most difficult objects to add styles due to its browser compatibility and complex tag nesting methods. Most front-end er replaces the table label in the webpage with p, mainly because p is easier to add CSS styles than the table.
The jQuery implementation opens the Link Method in the new window and collects several links. You can choose to use them as needed.
First: the following code is for a in the jb51 style to open in a new window.
The Code is as follows:
The # section in the url can be used to change the url value without any changes. This feature is very useful. For example, after you enter the video list in the potato ticket of the video website, click to play a video. Of course, it is best not to
JSON (JavaScriptObjectNotation) is a simple data format, which is lighter than xml. JSON is a JavaScript native format, which means that no special API or toolkit is required to process JSON data in JavaScript. JSON rules are simple: the object is
This tutorial will explain how to use JQuery and CSS to create a cool and dynamic menu step by step. JQuery's "write less, do more" feature is a household name. Even if there is no rich JavaScript programming experience, you can quickly learn how to
A piece of browser judgment code written during the Team's js framework construction process. For more information, see. Return (Array) borwser
For example, if the current browser type is ie6.0, The bortings value should be ["ie", "6", "6.0"]
The
Both xheditor and validate are excellent jQuery plug-ins, but they are combined. If the initialization order is incorrect, some subtle results will appear. Both xheditor and validate are excellent jQuery plug-ins, but they are combined. If the
Put the script in the body. When the browser encounters the & lt; script & gt; tag, the browser does not know whether the script will insert text or html tags, therefore, the browser stops analyzing html pages and executes scripts. The script can be
Jsfunction defines the use of functions, to learn more about js Object-Oriented Knowledge.
1. The most basic function declaration is used as a local shard.
The Code is as follows:
Function func (){}OrVar func = function (){};
2. Use as a class
Summary of some restrictions on text boxes ~~
1. Chinese characters cannot be entered in the restricted text box:
In the past, we often used judgment to write data, for example:
The Code is as follows:
Function nocn (obj){For (I = 0; I
{
There is no class concept in JavaScript, but JavaScript can indeed implement overload, polymorphism, and inheritance. In fact, these methods can be explained by reference in JavaScript and prototype in combination with the variable scope.
1.
If you want to get $. the value returned by ajax () is directly used in success: funciton () {returnxx}. To obtain the value of xx, you must use global variables in the script. Use global variables to extract xx values. If you want to get $. the
This article describes how to efficiently assemble strings in Javascript. I hope you can read more efficient code later. Do not make the client browser too slow to improve user experience. When Using Ajax to submit information, I may often need to
When I tested the code today, I found a lot of ajax that IE can run, but an error was reported in FF. The incompatibility between IE and Firefox in JavaScript and the unified method are summarized as follows. If you need it, you can check the
Many people may encounter such problems. JS debugging is also very depressing. Although my JS learning is not so thorough, it is basically a beginner. however, I still have some experience in JS debugging:
First, when we write a piece of JS Code:
1
JQueryEasyUI Chinese APIButton usage summary. For more information, see.
LinkButton [link button]
Instructions for use
Header file used: easyui.cssjavasicon.css, jquery-1.4.2.min.js, jquery. easyui. min. js
The Code is as follows:
Easyui
JQuery
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