What will be the output of the following HTML DOM code?
<!DOCTYPE html>
<html><body>
<p id=”begins”>First Attempt! </p>
<script>
var txt=document.getElementById(“begins”).innerHTML;
</script>
</body></html>

ans: a) First Attempt!

LEAVE A REPLY

Please enter your comment!
Please enter your name here