• 2022-05-27
    下列哪一选项属于JS的输入输出语句()
    A: alert(msg);
    B: console.log(msg);
    C: prompt(msg);
    D: 以上都是
  • D

    内容

    • 0

      MSG in Chinese means 味精.

    • 1

      下列代码的输出结果是__________。<script type="text/javascript">function msg(){ var p=document.createElement("p"); var Text=document.createTextNode("Hello!"); p.appendChild(Text); document.body.appendChild(p);}msg();</script>

    • 2

      以下哪些选择项是输出语句? A: document.write B: console.log C: alert D: prompt

    • 3

      对如下JSP代码说法正确的是(). <% Sringstr=”Hello.JBIT!”; session.setAttribute(“msg’,str); StringgetStr=session.getAttribute(“msg”); out.println(getStr); %>

    • 4

      Given classes defined in two different files: What is the result of executing XMLMessage.main?() A: text B: Compilation fails. C: <msg>text</msg> D: An exception is thrown at runtime.