제목 : 예제. JavaScript1.2의 history객체 흉내내기(back(),forward(),go(n))
    
    
        
            
                | 글번호: |  | 246 | 
            
                | 작성자: |  | 레드플러스 | 
            
                | 작성일: |  | 2004/10/29 오후 1:01:00 | 
            
            
                | 조회수: |  | 7725 | 
            
        
     
 
    
	
	
    
	//JavaScript1.2의 history객체 흉내내기(back(), forward(), go(n))
using System;
public class history{
    public static void back(){
        Console.WriteLine("뒤로 이동합니다.");
    }
    public static void forward(){
        Console.WriteLine("앞으로 이동합니다.");
    }
    public static void go(int index){
        if(index < 0){
            Console.WriteLine("{0}번째 뒤로 이동합니다.",index);
        }
        else if(index == 0){
            Console.WriteLine("새로고침합니다.");
        }
        else{
            Console.WriteLine("{0}번째 앞으로 이동합니다.",index);
        }
    }
}
public class history_test{
    public static void Main(){
        history.back();//뒤로
        history.forward();//앞으로
        history.go(0);//1단계 뒤로
    }
}