Apeejay School Half Yearly Examination - 2020 Class - XII: Date: 08.10.2020 F.M. - 35 Section - A
Apeejay School Half Yearly Examination - 2020 Class - XII: Date: 08.10.2020 F.M. - 35 Section - A
Apeejay School Half Yearly Examination - 2020 Class - XII: Date: 08.10.2020 F.M. - 35 Section - A
4) The <div> element should turn red when someone moves the mouse on top it in the following
coding :
<div ___________ =this.style.backgroundColor='red'">myDIV.</div
(a) onLoad() (b) onMouseOut() (c) onMouseOver() (d) onUnLoad()
5) Which is the correct assignment operator that will result same as x = x * y
(a) += (b) *= (c) %= (d) -=
Section - C
II) Do as directed : [2+1+2+2=7]
1) Deduce the output
A=‘‘Be positive’’
(a) var d = A.indexOf(‘‘positive’’)
(b)document.write(A.length)
3) var a = 10;
var b = "String";
var linebreak = "";
result = (typeof b == "string" ? "B is String" : "B is Numeric");
document.write("Result => " + result + linebreak);
document.write("Result => ");
document.write(result);
document.write(linebreak);
result = (typeof a == "string" ? "A is String" : "A is Numeric");
document.write("Result => ");
document.write(result);
document.write(linebreak);
4) Underline the errors and rewrite the code after removing the errors.
Function 3_alert_box
{
alert(“Hi!, I am from a function.’);
}
Section - D
1) Write the HTML code to generate the following output : [3+3+3=9]
2) Write a JavaScript program to find out whether the given year is leap or not. Use prompt box for input
the year.
i) The object on the left hand side shows the position and size of the image for frame 1. The colour of
the object is blue.
ii) The object on the right hand side shows the position and size of the image for frame 20. The colour
of the object is green.
iii) The circle on frame 1 moves and transforms into an ellipse on frame 20.
Write the procedure and property settings for animating the above scenario.
************