22-2 簡?範?

ڭ̲{Τ@²檺dҨӻ WSHAdҭlɦpUG

lɡ]hello01.js^G]ǦϰUYi^
// pLX "Hello World!

WScript.Echo("Hello world!"); 

AiHϥΥNrs边ͦɮ׫AMAΤUCTؤP覡ӰG

  1. b DOS UJucscript hello01.jsvANiHb DOS LXuHello world!vC
  2. b DOS UJuwscript hello01.jsvAN|}Ҥ@ӤpALXuHello world!vApUG

  3. bɮ`I hello01.jsA]iH榹 WSH ɮסAòͤWzC
nSO`NOAq`H JScript g WSH ɮסAɦWq`O jsA@~tΤ]|NH JScript D WSH Zp즹ɮסC

~Ab WSH YnLXTAҥΪƬO WScript.EchoAoMΤݥHΦAݪ JavaScript ҥΪCLƳPC

Hint
JavaScript CLƪG
  • bΤݪGdocument.write()
  • bAݪ ASPGResponse.Write()
  • bW WSHGWScript.Echo()

Yϥ VBScript ӦLXuHello world!vA{XpUG

lɡ]hello01.vbs^G]ǦϰUYi^
' pLX "Hello World!

WScript.Echo("Hello world!") 

pPezAA]iHϥΤTؤPkӰAұo쪺GM hello01.js O@˪C@ӨAq`H VBScript g WSH ɮסAɦWq`O vbsA@~tΤ]|NH VBScript D WSH Zp즹ɮסC

FH js M vbs ɦW~AWSH ɮ ]iHϥ wsf]Windows Scripting Files^ɦWAϥΦɦW WSH ɮפeOH XML ӧe{AdҦpUG

lɡ]hello01.wsf^G]ǦϰUYi^
<job>
<script language="JScript">
// ϥ wsf ɮרӦLX Hello World!
WScript.Echo("Hello World!");
</script>
</job>

ڭ̤]iHϥΫezTؤkӰ榹ɮסCϥ wsf nBpUG

HUoӽdҡAPɥH JScript M VBScript ӦLXTG

lɡ]hello02.wsf^G]ǦϰUYi^
<job>

<script language="JScript">
// Pɨϥ JScript M VBScript @ wsf ɮ
WScript.Echo("uHello worldv via JScript!");
</script>
<script language="VBScript">
WScript.Echo("uHello worldv via VBScript!")
</script>

</job>


JScript {]pPΡGΩ WSH