356). Which function among the following lets to register a function to be invoked once?

[A]setTimeout()
[B]setTotaltime()
[C]setInterval()
[D]settime()

Show Answer

357). Which function among the following lets to register a function to be invoked repeatedly after a certain time?

[A]setTimeout()
[B]setTotaltime()
[C]setInterval()
[D] settime()

Show Answer

358). Which is the handler method used to invoke when uncaught JavaScript exceptions occur?

[A]Onhalt
[B]Onerror
[C]Both onhalt and onerror
[D]Onsuspend

Show Answer

359). Which property is used to obtain browser vendor and version information?

[A]modal
[B]version
[C]browser
[D]navigator

Show Answer

360). Which method receives the return value of setInterval() to cancel future invocations?

[A]clearInvocation()
[B]cancelInvocation()
[C]clearInterval()
[D]clear()

Show Answer

361). The setTimeout() belongs to which object?

[A]Element
[B]Window
[C]Location
[D]Event

Show Answer

362). Which method receives the return value of setTimeout() to cancel future invocations?

[A]clearTimeout()
[B]clearInterval()
[C]clearSchedule()
[D]cancelInvocation()

Show Answer

363). What will happen if we call setTimeout() with a time of 0 ms?

[A]Placed in stack
[B]Placed in queue
[C]Will run continuously
[D]Will execute immediately

Show Answer

364). To which object does the location property belong?

[A]Window
[B]Position
[C]Element
[D]Location

Show Answer

365). What is the result of the following code snippet?
window.location === document.location

[A]False
[B]True
[C]0
[D]1

Show Answer

366). What will be the output of the following JavaScript code?
function getcube()
{  
    var number=document.getElementById("number").value;  
    alert(number*number*number);  
}
Enter No:

[A]9
[B]27
[C]Error
[D]Undefined

Show Answer

367). What will be the output of the following JavaScript code?
function totalelements()  
{  
    var allgenders=document.getElementsByName("gender");  
    alert("Total Genders:"+allgenders.length);  
}  

[A]0
[B]Error
[C]2
[D]1

Show Answer

368). What will be the output of the following JavaScript code?
function counth2()
{  
    var totalh2=document.getElementsByTagName("h2");  
    alert("totalh2.length);  
}  

hello

hello

[A]0
[B]hello
[C]h2
[D]2

Show Answer

369). What will be the output of the following JavaScript code?
function validate() 
{  
    var msg;  
    if(document.myForm.userPass.value.length>5)
    {  
        msg="good";  
    }  
    else
    {  
         msg="poor";  
    }  
    document.getElementById('mylocation').innerText=msg;  
}  
Strength:no strength

[A]Strength: good
[B]Strength: poor
[C]Strength: no strength
[D]Undefined

Show Answer

370). What will be the output of the following JavaScript code?
function showcommentform() 
{  
    var data=”new text”  
    document.getElementById('mylocation').innerHTML=data;  
}  

[A]Comment
[B]new text
[C]Error
[D]Undefined

Show Answer