+ 1

var myVar1=document.getELementById"firstId ".innerHTML="say Hi", myVar2=document.getELementById"secId".innerHTML=" say how are

urgent plz help

31st Aug 2018, 6:40 AM
amber stolck
amber stolck - avatar
3 Answers
+ 5
<p id="fId"></p> <script> document.getElementById("fId").innerHTML="Say hell0"; </script> you need to know about {innerHTML}
31st Aug 2018, 7:24 AM
Sudarshan Rai
Sudarshan Rai - avatar
+ 3
Wrong syntax
31st Aug 2018, 6:56 AM
CalviŐ˛
CalviŐ˛ - avatar
+ 1
document.getElementById("id").innetHTML; instead of document.getELementById"id".innerHTML; and you should use = "say Hi" after that var myVar1 = document.getElementById("firstid").innerHTML; myVar1 = "say Hi";
31st Aug 2018, 7:19 AM
Roel
Roel - avatar