javascript if elseif 语句 JavaScript 日期setUTCDate方法 JavaScript 日期setUTCFullYear方法 javascript if elseif 语句 <html> <body> <script type = "text/javascript"> <!-- var book = "maths"; if( book == "history" ) { document.write("<b>History Book</b>"); } else if( book == "maths" ) { document.write("<b>Maths Book</b>"); } else if( book == "economics" ) { document.write("<b>Economics Book</b>"); } else { document.write("<b>Unknown Book</b>"); } //--> </script> <p>Set the variable to different value and then try...</p> </body> <html> JavaScript 日期setUTCDate方法 JavaScript 日期setUTCFullYear方法