1. Type conversion:
It is divided into automatic conversion and casting, which is generally used for casting.
Convert other types to integers:parseint();int integer
Convert other types to decimals:parsefloat(),float decimal (short after decimal point )
Determine if it is a valid number type:isNaN(); emphasis
is a number then returns false, not a number to return ture. similar to bool in C #
@ Note the need to put prompt in the isNaN method This is an easy to forget point;
2. operators:
math operator :+ -*/% + +-- priority level reduced
relational operators := = ! = >= <= > <;
logical operators :&& | | ! ;
Other operators :+ = = *=/=%=? :;
3. statement:
It is generally divided into sequential, branching, and cyclic statements.
(1) Branch statement if:
If(judging condition)
{
Statements that meet the criteria to be executed
}
Else
{
Statements executed when a condition is not met
}
(2) loop for statement:
For( initial condition; cyclic condition; state change )
{
Loop body
}
(3) problem type: exhaustive, iterative. two classic case 1+2+. +100=? and 100 numbers to find a number associated with 7
(4) Two keywords:break(jump out of the end metaphor eat to fly ) and continue ( abort the cycle into the next cycle metaphor eat to eat to the sand ).
(5) If you want to output the value of a parameter: The output value is "+a+" and "+b" should be replaced with placeholders {0} ....
<script>function visible1 () { $("P"). hide ();}; need to load a plugin jquery official website
</script>
<body>
<input type= "button" onclick = "visible1 ()" value = " dot here let text disappear "/> button
<p> I will disappear. </p> Tags
$ ("Id1") is equivalent to document.getElementById("Id1")
* content is very broken but to master is to memorize more with a few and C # There are many are interlinked
JS type conversion, operator, statement