Er, this time we mention jquery.
We know that jquery is a good guy in JavaScript.
Many people even started learning JavaScript For jquery.
For example, undefined.
=. =
Then a colleague encountered a problem when using jquery.
Er,
16.1 web Storage
In the traditional HTML era, the main function of a browser is to display HTML pages. Even if JavaScript scripts are added, the browser still serves to dynamically modify HTML pages. Therefore
The browser is just a "interface
SUMMARY:Function obj $ (id) Get the object according to the idFunction val $ (id) obtains the object Value Based on the id.Function trim (str) deletes spaces on the left and rightFunction ltrim (str) deletes spaces on the leftFunction rtrim (str)
This article is a summary of some of the Javascript I have encountered in my daily work, mainly for the use of scripts in Asp.net.1. textbox verification (this is actually a regular content)
2. Check whether checkboxlist is selected.
// ID
Js achieves drag effect, js implements drag
First, let's take a look at the basic rules and problems of object-oriented exercises:
First, write a common writing method, and then change it to an object-oriented writing item.Normal method Deformation
·
Learn about the decoration mode and JavaScript design mode of the javascript design mode.
Sometimes we don't want a class to be very huge in nature, and it contains many responsibilities at a time. Then we can use the decorative mode.Decorated with
Page code:
[Javascript]View plaincopyprint?
Event examples, including user-defined events and Use of on, addListener, and EventManager.
Move the mouse over to me!
Js Code
[Javascript]View plaincopyprint?
/*****
[Website announcement]
click and drag VaR prox;VaR proy;VaR proxc;VaR proyc;Function show (ID) {/* -- open --*/Clearinterval (prox );Clearinterval (proy );Clearinterval (proxc );Clearinterval (proyc );VaR o = Document. getelementbyid (ID );O.
Declaration: Document. ALL: This object only exists in IE. Therefore, this object is used to determine the browser type.
I. IFRAME object
In IE, you can use document. Frames ["ID"]; To obtain the IFRAME object,
In Firefox, document.
Oday, I implemented the DUI Lian ad banner in two ways according to two articals found in Internet
* ** Method 1 ***Reference: website couplet-style flash AdvertisementSource codeHttp://ilovinit.idc99.cn/blogview.asp? Logid = 116
The artical
using less Code to achieve the same effect, we should write the Program ultimate goal, of course, readability cannot be lost. In the last run box of the first part, I have made such an exploration. However, if you do not change the value of the
as the core selector of Dom, There is a bug in IE6, which is so embarrassing. This bug will return the first element whose ID or name is equal to the input ID.
ie getelementbyid bug by situ zhengmei This is the wrong element
1. Get the dropdownlist Control Value
Function getdllvalue (ID ){VaR r = Document. getelementbyid (ID );For (VAR I = 0; I If (R [I]. Selected ){Return R [I]. text;}}}
PS: ID is the Control ID, which must be enclosed by quotation marks.
VaR text =
The HTML Dom defines multiple methods for searching elements. Besides getelementbyid (), getelementsbyname () and getelementsbytagname (). However, if you need to find a specific element in the document, the most effective method is getelementbyid ()
The current page has a variety of page effects, commonly used pop-up layer effects, seamless scrolling effect, Tab switching effect. Today, I will share a switch between tabs written in native javascript. Due to my limited level, please note if you
Currently, many websites have such an effect. When the page is scrolled to a certain height, the menu bar is fixed at the top of the page. It is actually changing the position value.
Html code:
Copy codeThe Code is as follows:
11111
I told you how to move people in the first two lectures. Today, let's take a look at how to implement the situational dialogue similar to the legend of the Three Kingdoms. The specific link is shown below.
I. Preface
I believe everyone will remember
AJAX introduction:AJAX refers to Asynchronous JavaScript And XML (Asynchronous JavaScript And XML), And is a web development technology used to create interactive web applications. Through AJAX, JavaScript can use the XMLHttpRequest object of
The following two aspects are summarized:
1. in IE, the script cannot use setAttribute () to set its style information (css). element must be used. style. property = value (Note: Here value is the value to be set) to realize the rendering effect of
:
Function:1. You can set up or down the direction keys.2. Supports keyword highlighting. (Omitted in this Code)3. Press enter to submit the selected items.Usage: Focus on id = tbxsearch and id = search_suggest. If the html part involves locating
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.