ExtJS can be used to access container objects. For more information, see.
I. Attributes
OwnerCt: Get the container of the current object.
Items: set list
II. Application Example
The Code is as follows:
Ext. onReady (function (){Var _
In the example where JavaScript receives keyboard commands, press different keys on the keyboard, and the program will jump to different webpages. In this example, press the key program to jump to the homepage of the home of the script, and realize
When creating a webpage, you sometimes need to know the exact position of an element on the webpage. The following tutorial summarizes the knowledge of Javascript in web page locating.
I. absolute size and relative size of webpages
First, we need
JQuery user manual. You can read it patiently and get started.
Thu:JavaScript processing
$. Browser () determines the browser type and returns the boolen Value $ (Function(){ If($. Browser. msie ){Alert ("This is an Internet browser.");} Else If($.
In JavaScript, var is used to declare a variable, but this syntax is not strictly required. If you modify it many times, you can directly use a variable instead of using var to declare it. Var x = "XX ";
Y = "xxx ";
And so on. This has a problem.
Comparison of the performance of adding page elements to createElement and innerHTML of Javascript recently encountered js efficiency problems, which are about adding elements to the page.
Suppose we have the following page:
The Code is as follows:
Today, let's take a look at how MooTools makes filtering user input very easy. Today we will talk about some basic numeric filtering, and tomorrow we will talk more about string filtering. Note: The input filtering in JavaScript is only used to
A simple example of javascript Public Member definition, Private member definition, and privileged method definition is provided.
The Code is as follows:
Script// Define a javascript classFunction JsClass (privateParam/**/, publicParam) {//
Character replacement is a very important function. javascript has a String. replace (), but this method has many advantages that are not unknown to new users. If you use it well, you can save a lot of valuable time. What are you waiting? Come in
As mentioned in the previous article, next time we will introduce you to the detailed webServices-based JqueryAjax call, how to convert the data of a datatable to JSON data, and then convert the data into javascript objects through json2.js on the
& Quot; the event mechanism makes the program logic more in line with the real world. In JavaScript, many objects have their own events. For example, the button has an onclick event, and the drop-down list box has an onchange event, these events
In traditional Javascript, it is best to determine whether a page element exists before performing some operations on a page element. The reason is that operations on a nonexistent element are not allowed. For example:
The Code is as
Sometimes, when uploading an image, it is best to simply preview the image. This makes it easier for us to check whether the image is correctly displayed or not.
javascript image preview script function preview (imgFile, num) {// preview code.
JQuery is a great JS class library with rich UI libraries and plug-ins. But I love his selector. I feel that other functions are sometimes far away from the background staff, so I usually only use his selector. Today, I suddenly became interested in
Singleton
The Code is as follows:
/* Basic Singleton .*/Var Singleton = {Attribute1: true,Attribute2: 10,Method1: function (){},Method2: function (arg ){}};One of the main purposes of the single-piece mode is the namespace:/* GiantCorp namespace .
Summary of js string operation functions. Concat ()-combines two or more characters to return a new string.
IndexOf ()-returns the index at the first part of a substring in a string. If no match exists,-1 is returned.
CharAt ()-returns the
This object is equivalent to HashMap in Java. Of course it is not as powerful as HashMap. Provides the basic method, and the simple method will not be commented out in the source code.
The Code is as follows:
// Tool functions of the Hash
When selecting folders in web application development, this is troublesome for web programmers. Because of local security restrictions, JS cannot access local files, folder selection is generally avoided, when I was writing a program, I also
Javascript browser determines the function of converting the arguments to array traversal.
The Code is as follows:
Var $ d = document;Function $ I (s) {return $ d. getElementById (s );}Var _ jsc = {}_ Jsc. client = (function (){Var t = {};Var B =
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