我是html / css的新手。我有这个垂直的桌子,底部有一个下拉按钮。我想要的是,让我们说,下拉按钮的所有3个选项将我重定向到特定的servlet。说servlet" A"。但是这些选项中的每一个都有不同的价值。根据值,servlet将执行特定的操作。但是,我怎样才能将该表的输出放入同一个servlet中?提前致谢 !! :)
table, th, td {
border: 3px solid #5c5f63;
border-collapse: collapse;
table-layout: fixed;
}
th, td {
padding: 2px;
text-align: left;
}
td{
word-wrap:break-word;
color: red;
background: #171819;
}
th{
background: #000000;
color: #00FF00;
}
.dropbtn {
background-color: #000000;
color: white;
padding: 18px;
font-size: 18px;
border: solid;
cursor: pointer;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: white;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {
background-color: #171819;
color: white;
}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown:hover .dropbtn {
background-color: #00FF00;
color: black;
}

<body>
<h2>Unchecked Loan Requests:</h2>
<table style="width:80% " >
<tr>
<th>Loan ID:</th>
<td>423</td>
</tr>
<tr>
<th>Customer ID:</th>
<td>1</td>
</tr>
<tr>
<th>Customer Wanted Amount:</th>
<td>4000</td>
</tr>
<tr>
<th>Car Loan Type:</th>
<td>new</td>
</tr>
<tr>
<th>Duration (in years):</th>
<td>8</td>
</tr>
<tr>
<th>Annual Income:</th>
<td>1980</td>
</tr>
<tr>
<th>Licence:</th>
<td>no</td>
</tr>
<tr>
<th>Max Amount:</th>
<td>20000</td>
</tr>
<tr>
<th>Years:</th>
<td>1-4</td>
</tr>
<tr>
<th>CC:</th>
<td>1600cc</td>
</tr>
<tr>
<th>Loan Admin Amount Suggestion:</th>
<td>17000</td>
</tr>
<tr>
<th>Suggestion</th>
<td>wongweoginwgwegwgwegewgwegwegwegweg</td>
</tr>
<tr>
<th>Checked:</th>
<td>no</td>
</tr>
</table>
<div class="dropdown">
<button class="dropbtn">DECISION</button>
<div class="dropdown-content">
<a href="#">Accept</a>
<a href="#">Decline</a>
<a href="#">Modify</a>
</div>
</div>
</body>
&#13;
答案 0 :(得分:0)
使用<select>
的{{3}}属性来调用JS函数,该函数会将您重定向到servlet,并将所选值添加为参数。
我强烈建议您阅读一些教程。