What will be the output of the following JavaScript code? [code] <p id="demo">head</p> <button onclick="myFunction()">Try it</button> <script> f

What will be the output of the following JavaScript code?
Code:
<p id="demo">head</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() 
{
   var x = document.getElementById("demo");
   x.innerHTML = x.attributes[0].isId;
}
</script>
A. head
B. true
C. false
D. 0
 

Tìm kiếm

Back
Top