<! DOCTYPE html>/*var i = 0;i++;if (i = = 5) {i = 0;} i%=5;*/window.onload=function (){ varALi = document.getElementsByTagName (' li '); vararr = [' red ', ' yellow ', ' blue '];varstr = "; for(vari=0; i<ali.length; i++) {Ali[i].index=i; Ali[i].style.background= arr[i%Arr.length]; Ali[i].onmouseover=function (){ This. Style.background = ' Gray '; }; Ali[i].onmouseout=function (){ This. Style.background = arr[ This. index%Arr.length]; }; Ali[i].onmouseover=function() {str= This. Style.background;//First Save Color This. Style.background = ' Gray '; }; Ali[i].onmouseout=function (){ //this.style.background = arr[this.index%arr.length]; This. Style.background =str; }; Ali[i].checked= !ali[i].checked; varA = 120<90 && 20;//The front does not set up behind does not execute varb = 120<90 | | 20>200;//before the establishment behind does not execute varc =!!true; vard =! 200;//! Can be reversed, and data type conversions can be made, and any type can be turned to a Boolean type, }};</script><style>li {height:24px; margin-bottom:3px; list-Style:none;}</style><! DOCTYPE html>varstr = ' JS ';Switch(str) { Case' JS ': Alert (' JS '); Break; Case' HTML ': Alert (' HTML '); Break; default: Alert (str);}120<45? Alert (' 120<45 '): Alert (' 120!<45 ')); alert (120<450? ' 120<450 ': ' 120!<450 ' );varI=0; while(i<3) {alert (i); I++;} for(vari=0; i<6; i++){ if(i = = 4 ){ //Break ; Jump Continue;//Skip over} alert (i);}</script><! DOCTYPE html>* True and false questions: Data type-Number (NaN), String, Boolean, function, object (element, [], {}, null), undefined true: A number other than 0 (positive or negative number is true), non-empty string (space is true), true, function, found element, array, JSON false: 0, NaN, empty string ' ', false, Element not found, null, undefined */Ifnull ) { alert (' true ');} Else { alert (' false ');} </script>
JS---11 operator, Process Control, true and False