The following describes 10 practicalBrowsing assistance Tidy ReadCopy codeThe Code is as follows: javascript :( function () {var s = document. createElement ("script"); s. charset = "gb2312"; s. language = "javascript"; s. type = "text/javascript";
I have to extract some of the content in Javascript advanced programming, which is also my reading notes. Because of the importance of the Javascript object-oriented mechanism and its wide range of content, we will introduce it one by one here.The
For example, sort javascript arrays.Delete, select, and group array data.So, later I was excited.It's not enough.Write an SQL library that can be applied in javascriptLater I thought, why can't I use javascript to directly connect to the
Why not use textarea?
1 not highlighted
2. The tab key is unavailable. -- Press the tab key to switch to the next control.
3. No code for formatting. -- Because you are used to the Eclipse environment, you can use ctrl + shift + F to format the code.
CollectGarbage ();SetTimeout ("CollectGarbage ();", 1 );SetTimeout () is used here because all objects can be completely recycled to prevent the release from being failed due to reference between variables. It can be used as a safeguard. In
Tabs [label]
Create a tabInstructions for use Header file used: easyui.cssjavasicon.css, jquery-1.4.2.min.js, jquery. easyui. min. jsHtmlCopy codeThe Code is as follows:Tab1Tab2Tab3 JQuery code Copy codeThe Code is as follows:// Create a label
IfSelect ElementThe selected attribute is not specified for all option elements. The first option is selected by default.
You can use select. selectedIndex to obtain the index of the selected option element.
You can use select. options [select.
After checking a large amount of information, I summarized the following three rules, which can solve all the problems I have encountered.Rule 0: the function itself is a special type. In most cases, it can be considered as a variable.Copy codeThe
Let's look at a simple example:The following example uses the three pages separated by frame.html?top.html?bottom.html to describe how to do this.Frame.html consists of two pages (bottom (bottom.html) under the top (top.html#). The Code is as
Copy codeThe Code is as follows:Http: // Javascript verification form Overview1. length limitCopy codeThe Code is as follows: 2. Only Chinese characters are allowed3. "English onlyCopy codeThe Code is as follows: 4. Only numbers are allowed.Copy
We often need to change the node attributes, content, and text to use several functions.1 attribute Here we see an attr () function. There are four forms. attr (name) is used to obtain a selected Attribute value. attr (properties) attr (key, value)
To improve the user experience, I thought about whether jQuery can be used to write a plug-in during the lunch break. I realized this function. When writing this plug-in, I subconsciously thought someone should have written this plug-in on the
I. OperatorsCopy codeThe Code is as follows:. [] () Attribute access and function callDelete new typeof + -! Unary operator*/% Multiplication, division, modulo+-Addition, connection, and Subtraction>= ===! = Equality operator& Logic and| Logical or?
The String processing functions of Javascript native are not rich enough,Native string function: http://www.jb51.net/w3school/js/jsref_obj_string.htmQuestion 1: Is there any extension library for the String type?Yes, not many, not
Copy codeThe Code is as follows:# Flower {Width: 100px;Font-size: 12px;Float: left;Opacity: 0.5;Filter: alpha (opacity = 50 );} Define a div element with id = "flower" and set the above style. Our goal is to get the final attribute of the style
Window. alert: only one parameter. The warning box is displayed; No return value.Window. confirm: there is only one parameter. The prompt box is displayed. Press OK to return true; Press Cancel to return false.Window. prompt: parameter, which has
Today, I saw a script on the Internet to obtain Elements based on ClassName, which is recorded here for future use.Copy codeThe Code is as follows:Var getElementsByClassName = function (searchClass, node, tag ){If (document. getElementsByClassName ){
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