Home / CSE / Javascript - CS :: Discussion

Discussion :: 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

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    The Client-side JavaScript code is embedded within HTML documents in four ways :
    1. Inline, between a pair of “script” tags
    2. From an external file specified by the src attribute of a “script” tag
    3. In an HTML event handler attribute, such as onclick or onmouseover
    4. In a URL that uses the special javascript: protocol.


Be The First To Comment