This is a JS web page Image Viewer commonly used on the Internet. It can control operations such as image enlargement, downsize, restoration, moving position, and dragging. It is also compatible with IE and FF Firefox browsers, it can be used on
The method for operating css attributes in js is regular. 1. for css attributes without hyphens, you can directly use style. attribute name.
For example, obj. style. margin, obj. style. width, obj. style. left, obj. style. position, etc.
2. for
Add namespaces to your encapsulated javascript library to improve code reusability. After more than 10 js files are introduced to the same web page,
Functions with the same name in each js are prone to conflicts.
For example, the addCssStyle method
You can use javascript to delete option options. 1. JavaScript
The Code is as follows:
Var oSel = document. form1.DropDownCity;While (oSel. options. length> 0 ){OSel. removeChild (oSel. options [0]);}
2. JavaScript
The Code is as follows:
Recently I encountered a problem in ext. When I browsed the ext application in firefox and opened a Window Embedded with iframe for the first time after loading, I can directly execute js functions in iframe through js Code, however, if you close
You can refer to the implementation code to use ext to read xml in recent projects.
Software 1
1. gif
Control 2
2. gif
This is one of the most common examples on
Enter 1 in this box. These values are all written in the hidden domain. The Code shows that when the user input is included, you can press ENTER to select.
The Code is as follows:
Http://www.w3.org/TR/html4/loose.dtd>
20060427 simulate 163
I had nothing to do today, and changed the code I wrote last time. Added the function of dynamically appending and deleting stock information (the code runs based on jquery: jquery.com ). Because my understanding of Ajax technology is still in its
There are three main methods: 1. this. methodParent; this. methodParentsconstructor2.Parent. call (this, arg .....); 3. parent. apply (this, arg. arg ...) forArray is a little practical...
The Code is as follows:
Function P (name ){This. name =
Very nice js operations for table row code functions. Convenient
Form Object example function delrow1 () {var oElement = event. srcElement; while (oElement. tagName! = "TR") {oElement = oElement. parentElement;} var oTBody = oElement.
In a recent project, a small function is mainly used to conveniently select the data demonstration address: due to malicious programs, the address is removed as follows:
Solution:
1. when you click [select], obtain the data source (the server uses
I used this control in the search yesterday, but I don't know why AutoCompleteExtender automatically completed the expansion in IE. The function used with TextBox is similar to entering search words in google, the project in the search target is
The following compares the differences between several browsers. Pay attention to these differences when writing javascript code.
Serial number
Operation
Category
IE(6.0)
FireFox(2.0)
Mozilla(1.5)
CurrentBrowser
Remarks
On a webpage containing flash, Firefox prompts: getBoxObjectFor () is not recommended (). Use element. getBoundingClientRect (). When Flash is inserted into a webpage containing Flash, the following message is displayed:
Warning getBoxObjectFor ()
Selector uses cssselector to match page elements. To understand Selector, you must first understand cssselector. The following is the css2 selector syntax. Of course, many browsers only support part of this syntax, the Selector in Prototype mainly
Function definitions can be nested in other functions, which are commonly used as subfunctions. But it cannot appear in loops or condition statements. Function quantity. It is applicable to functions that are only used once and do not need to be
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