HTML中表单标记和锚标记之间的接口

时间:2014-04-02 06:48:42

标签: javascript html css perl cgi

嗨,我是html和javascript的新手。我有以下水平菜单代码和一些CSS样式。

    <style>
      ul
    {
    float:left;
    width:100%;
    padding:10px;
    margin:0px;
    list-style-type:none;
     }
    a.a1
    {
    float:left;
    width:6em;
    text-decoration:none;
    color:white;
    background-color:purple;
    padding:0.2em 0.6em;
    border-right:1px solid white;
    }
     a.a1:hover {background-color:#ff3300;}
    li {display:inline;}
      </style>
     </head>

     <body>
     <ul>
    <li><a class="a1" href="process.pl">Precheck</a></li>
    <li><a class="a1" href="robostats.pl">Reboot</a></li>
    <li><a class="a1" href="get.pl">Get</a></li>
   <li><a class="a1" href="scen.pl">Scen</a></li>
    <li><a class="a1" href="start.pl">start</a></li>
   </ul>
   The form tag is as below
 <form action="#" id=sel method="post">

   <input type="checkbox" name="vehicle" value="Bike">I have a bike<br>
    <input type="checkbox" name="vehicle" value="Car">I have a car 
  </form>

现在,当我点击&#34; Precheck&#34;在水平菜单中,我想获取表格标签的检查列表并运行process.pl脚本。请帮我解决这个问题。

1 个答案:

答案 0 :(得分:0)

您应该在process.pl和所需文件(robostats.pl, get.pl, scan.pl).

中添加此代码
$vehicle=$_POST['vehicle'];