<div id="david">Hello World</div> <button id="clickMe" onclick="showmessage()">Click Me</button> <P id ="GetArray"> </p> <script> function showmessage () { var GetText = document.getElementById("david") ; if (GetText.innerHTML=="Hello World"){ GetText.innerHTML="Hello FXXL"; }else { GetText.innerHTML="Hello World"; } } function SortArray (value) { text += "<li>" + value+ "</li>"; } var text = "<ul>"; var data = [ "Microsoft", "Apple", "Google", ]; data.forEach(SortArray); text += "</ul>"; document.getElementById("GetArray").innerHTML=text; </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)