apr 2023
apr 2023
1) Which func on is used to print an error message and exit from current code?
exit()
3) XML Parser cannot alter documents or create new documents. Jus fy True or False.
False. XML parsers can indeed alter documents or create new documents, depending on how
they are implemented and used
4) What is DOM?
DOM is a away of expressing the various nodes of an XML document as a tree of objects.
Then the tree can be traversed and various nodes can be accessed.
6) what is JQuery?
Jquery is a JavaScript library designed to simplify HTML DOM tree traversal and manipula on
as well as event handling, CSS anima on and Ajax.
3 Marks
4 Marks
1) Write a JavaScript code to display message - Exams are near. Prepare well for it" using
alert, prompt and confirm boxes. Accept proper input from user and display messages
accordingly
<html>
<head>
<script>
var t = confirm ("are you preparing for exams");
if(t==true) {
var s = prompt ("enter your name");
if((s.length)>0){
alert ("all the best "+s);
} else {
alert ("start your prepara on");
}
}
</script>
</head>
<body>
</body>
</html>
2) Write a PHP program to add or append in paragraph text and also in the numbered
(ordered) list in a given HTML document using jQuery selectors