Home / CSE / Javascript - CS :: Server Side and Client Side Scripting

CSE :: Javascript - CS

  1. Which of the following is a way of embedding Client-side JavaScript code within HTML documents?

  2. A.

     From javascript:encoding

    B.

     External file specified by the src attribute of a “script” tag

    C.

     All of the mentioned

    D.

     None of the mentioned


  3. When does JavaScript code appear inline within an HTML file?

  4. A.

     Between the “script” tag

    B.

     Outside the “script” tag

    C.

     Between or Outside the “script” tag

    D.

     None of the mentioned


  5. Which character in JavaScript code will be interpreted as XML markup?

  6. A.

     !

    B.

     >

    C.

     &

    D.

     .


  7. Which is the root element in a HTML document?

  8. A.

     HTML

    B.

     HEAD

    C.

     SCRIPT

    D.

     BODY


  9. What is the code for getting the current time?

  10. A.

     now = new Date();

    B.

     var now = new Date();

    C.

     var now = Date();

    D.

     var now = new Date(current);


  11. What is the code to start displaying the time when document loads?

  12. A.

     onload = displayTime;

    B.

     window. = displayTime;

    C.

     window.onload = displayTime;

    D.

     window.onload = start;


  13. One of the main advantage of using src attribute is

  14. A.

     It becomes self-cached

    B.

     It makes the HTML file modular

    C.

     It restricts manipulation in the HTML file

    D.

     It simplifies the HTML files


  15. What will be done if more than one page requires a file of JavaScript code?

  16. A.

     Downloads that many times

    B.

     Retrives from the browser cache

    C.

     Must be re executed

    D.

     None of the mentioned


  17. What is the default value of the type attribute?

  18. A.

     text/css

    B.

     text/javascript

    C.

     text

    D.

     xml


  19. The language is commonly used to

  20. A.

     Specify the user’s language

    B.

     Specify the language going to be scripted

    C.

     No longer in use

    D.

     Specify the programmer’s favorable language