Scripting Runtime Library(TextStream)
¿·Á ÀÖ´Â TextStream ÆÄÀÏÀ» ´Ý´Â´Ù.
¹Ýȯ°ªÀº ¾ø´Ù.
¿·Á ÀÖ´Â TextStream ÆÄÀÏÀ» ´Ý´Â´Ù.
<SCRIPT language=JScript> function CloseTest(filePath){ var fso; fso=new ActiveXObject('Scripting.FileSystemObject'); fileObj=fso.CreateTextFile(filePath,true); fileObj.WriteLine('Å×½ºÆ®ÀÌ´Ù.'); fileObj.Close(); return('»ý¼º ÆÄÀÏ="'+filePath+'"'); } </SCRIPT> <DIV id=showjs class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV> <DIV class=show onClick="showjs.innerHTML=CloseTest('C:\\JsTest\\testfile.txt')"> <SPAN class=ie>JScript</SPAN> <SPAN class=method>Close</SPAN> ¸Þ¼µå ¿¹Á¦</DIV>
<SCRIPT language=VBScript> Function CloseTestvb(filePath) Dim fso,fileObj Set fso=CreateObject("Scripting.FileSystemObject") Set fileObj=fso.CreateTextFile(filePath,True) fileObj.WriteLine("Å×½ºÆ®ÀÌ´Ù.") fileObj.Close CloseTestvb="»ý¼º ÆÄÀÏ='"&filePath&"'" End Function </SCRIPT> <DIV id=showvb class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV> <DIV class=show onClick="showvb.innerHTML=CloseTestvb('C:\\JsTest\\testfile.txt')"> <SPAN class=ie>VBScript</SPAN> <SPAN class=method>Close</SPAN> ¸Þ¼µå ¿¹Á¦</DIV>