您好,我是 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>
现在,当我在水平菜单中单击“Precheck”时,我想获取已检查的表单标签列表并运行 process.pl 脚本。请帮助我如何获得它。
最佳答案
您应该将此代码添加到您的 process.pl
和您需要的文件 (robostats.pl、get.pl、scan.pl)。
$vehicle=$_POST['vehicle'];
关于javascript - HTML 中表单标签和 anchor 标签之间的接口(interface),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22803540/