Question 66
Which tag is used to enclose any number of javascript statements in HTML document?
Explanation
Previous | Next |
UGC NET CS December 2019 - Question 65 | UGC NET CS December 2019 - Question 67 |
Previous | Next |
UGC NET CS December 2019 - Question 65 | UGC NET CS December 2019 - Question 67 |
Question 16 In a certain coding language. 'AEIOU' is written as 'TNHDZ'. Using the same coding language. 'BFJPV' wil...
The < script > element either contains scripting statements, or it points to an external script file through the src attribute.
Common uses for JavaScript are image manipulation, form validation, and dynamic changes of content.
Rest options are part of a normal HTML document.
So, option 2 is correct answer
Look at below example java script function for more detail: this function changes the html element text, style text color and fontSize. This function encloses 3 statements.
<!DOCTYPE html>
<html>
<head>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Hello World!";
document.getElementById("demo").style.color = "blue";
document.getElementById("demo").style.fontSize = "35px";
}
</script>
</head>
<body>
<p>When you click "Try it", a function will be called.</p>
<p>The function will display a message.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
</body>
</html>
Reference : JavaScript Introduction