First, let's talk about style sheet properties
1. Inline style, which is set in the element style attribute, has the highest level
2. Page style sheet definition that is defined in the page , the second level
3. External link Style sheet
If: A piece of ordinary code:
Where gift_list is the ID of a table
Copy Code code as follows:
var giftbody = document.getElementById ("Gift_list"). getElementsByTagName ("tbody") [0];
var gifttrs = Giftbody.getelementsbytagname ("tr");
JavaScript Object ComparisonsComparison character:==,!=,===,!==,>=,,= = always try to compare them straight, if the type is not the same, always try to convert.= = = More identity, no conversion on the comparison= = If it is the base type (string,
First create a COM component, insert a dual interface ITest, implement the following three methods on this interface:
STDMETHODIMP ctest::test (void)//No input/output parameter
{
//TODO: Add implementation code here
MessageBox (null,l "test",
The principle of sorting data by sort in JavaScript
The sort () method sorts the elements of the array in situ, and returns the arrays. The sort may not be stable. The default is sorted by the Unicode code points of the string;
Syntax: Arr.sort
This is the problem I remember, basically did not answer up, we know the teaching of the younger brother, we can not no longer
1. In the JS class inheritance is generally the class transcription and the prototype inherits the mixed use, in ExtJS's
javascript pixel puzzle game description 1. Move the mouse click in the Grid box to spell out the graphics. 2. If you are not satisfied with a point, click again to eliminate. 3. If you want to start again, click here: or reset: column
Document.documentElement.getBoundingClientRect
Here's an explanation of MSDN:
Syntax
Orect = Object.getboundingclientrect () return Value
Returns a Textrectangle object. Each rectangle has four integer properties (top, left, right, and bottom) which
Like what:
1. document.all () not in FF. Must be changed into document.getElementById ();
2. Obj.innertext = "XXX"; It seems that there are occasional problems in ff. Change to obj.innerhtml = "XXX"; on the line.
3. var OlE = document.body.onload;
Copy code code as follows:
function $Cookie () {
var A=arguments.callee;
Var b=a._cached;
if (a._cached) {return a._cached}
if (!) ( This instanceof a) {return new A}
if (typeof a._cached== "undefined")
1, for String,number and other basic types, = = and = = There is a difference
1 different types of comparisons, = = comparison "into the same type of value" to see whether the "value" is equal, = = = If the type is different, the result is unequal
JavaScript method Code:
Copy Code code as follows:
Set FieldSet height method, support IE browser, Firefox
Parameter 1:ptableid,fieldset the ID of the inner div or table
ID of the parameter 2:pfieldsetid,fieldset
Parameter 3:pimageid,
Copy Code code as follows:
function ConvertCurrency (currencydigits) {
Constants:
var maximum_number = 99999999999.99;
Predefine the radix characters and currency symbols for output:
var Cn_zero = "0";
var cn_one = "one";
var cn_two = "II"
Since the touch of JavaScript, the understanding of this parameter has been ambiguous. Although there is deep to understand, but also always feel that the kind of floating on the surface, not completely clear the clue.
But for this parameter, there
Objects and prototypes in JavaScript in the previous article (i) refer to some basic operations of the creation of objects in JavaScript, which are discussed next.
One factory model
We know that to create an object we can use the following code:
The objects in JavaScript are different from the general Object-oriented programming language (C++,java, etc.), and few people even say it is an object-oriented programming language because it has no classes. JavaScript has only objects, not
The example of this article for everyone to share the effect of JS waterfall flow loading, dynamic loading pictures for your reference, the specific contents are as follows
Mouse scrolling event, when the mouse scroll to the bottom, dynamically
function Styleheadersiblings () {
if (!document.getelementbytagname) return false;
var headers = document.getelementbytagname ("H1");
for (var i = 0;iAddClass (Elem, "Intro");
}
}
function Styleelementsiblings (tag,thechass) {
if
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