ÆÄÀÏ¿¡ ¼øÂ÷ÀûÀ¸·Î ½±°Ô ¾×¼¼½ºÇÒ ¼ö ÀÖ´Ù.
Script |
[propVal=]..propName; ..methodName(parameters); |
|
HTML | ¾ø´Ù. |
½ÇÁ¦·Î »ç¿ëÇÒ ¶§´Â TextStreamÀº FileSystemObject¿¡¼ ¹ÝȯµÈ TextStream °³Ã¼¸¦ ³ªÅ¸³»´Â º¯¼ö ÀÚ¸® Ç¥½ÃÀÚ·Î ¹Ù²ï´Ù.
¼³¸íÀ» À§ÇÑ ¿¹Á¦
¾Æ·¡ Äڵ忡¼ a
´Â FileSystemObject¿¡ ÀÖ´Â CreateTextFile ¸Þ¼µå·Î ¹ÝȯµÈ TextStream °³Ã¼ÀÌ´Ù.
<SCRIPT language=Javascript> function FSOtest(){ var fso=new ActiveXObject('Scripting.FileSystemObject'); var aTextFile=fso.CreateTextFile('c:\\JsTest\\testStream.txt',true); aTextFile.WriteLine('ÈÀÏ¿¡ ±â·ÏµÈ ¹®ÀÚ¿ÀÌ´Ù.'); aTextFile.Close(); } function FSOread(){ newWin=window.open('c:\\JsTest\\testStream.txt','jsTest','width=400,height=200,top=200,test=200'); } </SCRIPT> <FORM> <INPUT type=button value="ÈÀÏ ¸¸µé±â" onClick="FSOtest()"> <INPUT type=button value="ÈÀÏ Àбâ" onClick="FSOread()"> </FORM>
c:\\JsTest\\testStream.txt ÈÀÏÀÇ ³»¿ë 'ÈÀÏ¿¡ ±â·ÏµÈ ¹®ÀÚ¿ÀÌ´Ù.'·Î »ý¼ºµÇ¾î ÀúÀåµÇ¾ú´Ù.
<SCRIPT language=VBScript> Dim fso,fileObj Set fso=CreateObject("Scripting.FileSystemObject") Set fileObj=fso.CreateTextFile("c:\\JsTest\\testStream.txt",True) fileObj.WriteLine("This is a test.") fileObj.Close </SCRIPT>
WriteLine°ú Close´Â TextStream °³Ã¼¿¡ »ç¿ëµÇ´Â ¸Þ¼µåÀÌ´Ù.