1. Question: You are enabling cookies with JavaScript. What would be the default setting for the expires attribute of the document.cookie property?

    A
    The duration of the browser session

    B
    The duration the current document stays loaded

    C
    Twenty-four hours from the time the cookie is set

    D
    There is no default setting

    Note: Not available
    1. Report
  2. Question: Which of the following is not a valid string method?

    A
    link()

    B
    italics()

    C
    str()

    D
    sup()

    Note: Not available
    1. Report
  3. Question: Which of the following is true?

    A
    If onKeyDown returns false, the key-press event is cancelled

    B
    If onKeyPress returns false, the key-down event is cancelled

    C
    If onKeyDown returns false, the key-up event is cancelled

    D
    If onKeyPress returns false, the key-up event is canceled

    Note: Not available
    1. Report
  4. Question: Which of the following properties can you use to dynamically change the value of a <tr> tag?

    A
    HTML

    B
    innerHTML

    C
    outerHTML

    D
    text

    Note: Not available
    1. Report
  5. Question: What will the following code snippet do?cocument.alinkColor= " green "

    A
    It makes the background color of the document green

    B
    It makes the color of the active links green

    C
    It makes the color of the visited links green

    D
    It makes the color of all links green

    Note: Not available
    1. Report
  6. Question: Consider the following code snippet:
    <form name="frmOne">
    <select name="selList" size="1" onChange="change()">
    <option value="http://www.hotmail.com">tHomail</option>
    <option value="http://www.yahoo.com">Yahoo</option>
    </select>
    </form>
    You want that when an option button is selected, the appropriate website should be opened immediately. What will the change() function look like?

    A
    url=document.frmOne.selList.options[document.frmOne.selList..item].value

    B
    url=document.frmOne.selList.options[document.frmOne.selList.selectedIndex].value

    C
    location=document.frmOne.selList.options[document.frmOne.selList.item].value.value

    D
    location=document.frmOne.selList.options[document.frmOne.selList.selectedIndex].value

    Note: Not available
    1. Report
  7. Question: How would you detect the operating system of the client machine?

    A
    It is not possible using JavaScript

    B
    You would use the navigator object

    C
    You would use the window object

    D
    You would use the document object

    E
    None of the above

    Note: Not available
    1. Report
  8. Question: What would be the use of the following code?
    function validate(field)
    {
    var valid=''ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'';
    var ok=''yes'';
    var temp; 
    for(var i=0;i<field.value.length;i++)
    {
    temp='''' + field.value.substring(i,i+1)
    if(valid.indexOf(temp)==''-1'')
    {
    ok=''no'';
    }
    } 
    if(ok==''no'')
    {
    alert(''error'');
    field.focus();
    } 
    }

    A
    It will force a user to enter only numeric values

    B
    It will force a user to enter only alphanumeric values

    C
    It will force a user to enter only character values

    D
    None of the above

    Note: Not available
    1. Report
  9. Question: Consider the following code: var vNew=new Date() Which of the following options will return true?

    A
    vNew instanceof boolean

    B
    vNew instanceof object

    C
    vNew instanceof Date

    D
    All of the above

    Note: Not available
    1. Report
  10. Question: Which of the following escape sequences represents form feed?

    A
    //f

    B
    'f'

    C
    /f

    D
    \f

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd