Tuesday, August 19, 2014

Previous Interview Question Next Interview Question
Home

Which of the following indicates how many events the code snippets below will generate?

 Uncaught SyntaxError: Unexpected token <
<head>
<script type="text/javascript">
<!--
<!--description: the var nextEvent holds event.type and outputs to the alert window when an event happens.event.type tells you what event happens as it happens-->

function proveIt(event){

var nextEvent = event.type;
alert(event.type);
}
//-->
</script>
</head>

<body onload="proveIt(event)">

<form>
<input type = "button" value = "click me" onclick = "proveIt(event)">
</form>

</body>

         a)      1
         b)      2
         c)       3
         d)      Undefined


Answer :  B

Previous Interview Question Next Interview Question
Home

0 comments :

Post a Comment