Two (number 14th), JS attribute operation notes:
1, all the relative path, do not take to make judgments, that is, the relative path can not be read (but can write operations)
2, color value also do not take to make judgments (there will be compatibility issues);
3, innerHTML value do not take to make judgments;
4, IE6, IE7, IE8, does not support changing the type of input, compatibility will be problematic;
Hint idea: If insist to do, can consider using other methods, cleverly avoid some problems, achieve the effect visually;
5, change the floating problem of elements:
Under IE: is the variable name. Style.stylefloat:left/right;
Non-ie: is the variable name. Style.cssfloat:left/right;
Tip: If you want to change the value of a floating property of an element, you can first define two floating styles, such as:
. left{Float:left}
. Right{float:right}
<div class= "ClassName" ></div> this time, you can use JS to control the call to use the ClassName name on it, there will be no compatibility problem;
Work in accordance with user needs to solve the problem, the idea to be flexible!!!
Technology to master the compatibility problem of the solution, from the requirements, can provide the best solution;
Third, the use of brackets;
[] The value can be easily modified, very practical
Odiv.style.oattr.value=oval.value; Here, for example, this style doesn't make a difference.
Odiv.style[oattr.value]=oval.value; Use the brackets to
JS allowed to put in. Replace with []; Tips:[] Inside if the value is quoted, for example: Obtn.value written obtn["value"]
JS Study note 2015-4-15 (next day)