Nineteen, JavaScript array of

A, as follows

Second, the implementation of the results is as follows

<! DOCTYPE HTML > 
< HTML > 
< Meta HTTP-equiv = "Content-Type" Content = "text / HTML; charset = UTF-8"  /> 
< body > 
< h1 > My first website </ h1 > 

< P ID = "Demo" > </ P > 
< Script > 

var cars = [ " once " , " sea " , " difficult for water " ];
document.getElementById("demo").innerHTML = cars[0];

</script>

</body>
</html>

 

Guess you like

Origin www.cnblogs.com/tianpan2019/p/11307124.html