switch (user_for)
     {
         case "1":
                 }

解决方案 »

  1.   


    <script language="javascript">
    function action_to()
    {
        var user_for;
        user_for = document.getElementById("yongto").value;
        alert(user_for);
         switch (user_for)
         {
             case "1":
                 Search_form.action = "chuzu_index.asp";
                 break;
             case "2":
                 Search_form.action = "chuzu_index_1.asp";
                 break;
             case "3":
                 document.Search_form.action = "chushou_index.asp";
                 break;
             default:
                 document.Search_form.action = "chuzu_index.asp";
                 break;
         }
     }   
    </script><form name="Search_form" action="" method="get" style="margin-top: 0; margin-bottom: 0"> 
    <input type="text" id="yongto" value="1"> 
    <img border="0" src="images/search_b2.gif" width="84" height="22" onClick="action_to();" style="cursor:hand;"> </form>