Đinh Văn Đức
New member
What will be the output of the following JavaScript code?
A. 1
B. 2
C. 3
D. Error
Code:
<p>1</p>
<p>2</p>
<p>3</p>
function myFunction()
{
var l = document.getElementsByTagName("P").length;
alert(l);
}
B. 2
C. 3
D. Error