switch...case语句怎样接字符串啊???

参考:  
  <script   language="javascript">  
  function   test(cs){  
  switch(cs){  
  case   "a":alert("input   a");break;  
  case   "b":alert("input   b");break;  
  case   "c":alert("input   c");break;  
  default:alert("input   other   words");break;  
  }  
  }  
  test("a");  
  test("b");  
  test("c");  
  test("d");  
  </script>

你可能感兴趣的:(JavaScript,C++,c,C#)