Javascript 如何在带有复选框按钮的HTML弹出屏幕中显示结果
我想在弹出屏幕中显示复选框按钮选择的结果: 例如,如果我从下面选择:A.空调和e。洗碗机。我想要一个弹出屏幕,上面写着“你已经选择了空调和洗碗机”,点击一个按钮就会显示出来,我们称之为“显示”Javascript 如何在带有复选框按钮的HTML弹出屏幕中显示结果,javascript,html,popup,Javascript,Html,Popup,我想在弹出屏幕中显示复选框按钮选择的结果: 例如,如果我从下面选择:A.空调和e。洗碗机。我想要一个弹出屏幕,上面写着“你已经选择了空调和洗碗机”,点击一个按钮就会显示出来,我们称之为“显示” 您可以使用jquery对话框来实现它,有很多方法,我不是在这里给出我的代码,而是在这里给出链接,试试这个 仅使用HTML是不可能的。您尝试过使用javascript或jQuery吗? <table name="BuyProduct" id ="BuyProduct_H" style="
您可以使用jquery对话框来实现它,有很多方法,我不是在这里给出我的代码,而是在这里给出链接,试试这个
仅使用HTML是不可能的。您尝试过使用javascript或jQuery吗?
<table name="BuyProduct" id ="BuyProduct_H" style="width:100%;" >
<tr>
<td class="auto-style2" colspan="3">1- What were the products that you bought? </tr>
<tr>
<td class="auto-style53"></td>
<td colspan="2" class="auto-style54">
<input id="cbconditioning" type="checkbox" onclick="Chosen()" />a. Air Conditioning</td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td colspan="2">
<input id="cbradio" type="checkbox" onclick="Chosen()"/>b. TV Radio (TV, Home Theatre, etc.)</td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td colspan="2">
<input id="cbrefrigeration" type="checkbox" onclick="Chosen()"/>c. Refrigeration</td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td colspan="2">
<input id="cblaundry" type="checkbox" onclick="Chosen()"/>d. Laundry (Washer, Dryer, etc)</td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td colspan="2">
<input id="cbdishwasher" type="checkbox" onclick="Chosen()" />e. Dishwasher</td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td colspan="2">
<input id="cbtreatment" type="checkbox" onclick="Chosen()"/>f. Water Treatment (Water Dispencer)</td>
</tr>
<tr>
<td class="auto-style57"></td>
<td colspan="2" class="auto-style58">
<input id="cbhousewares" type="checkbox" onclick="Chosen()"/>g. Small Housewares (Microwave, Kitchen appliances, etc.)<br />
</td>
</tr>
<tr>
<td class="auto-style59"></td>
<td colspan="2" class="auto-style60">
<input id="cbothers" type="checkbox" onclick="Chosen()"/>h. Others Please Specify</td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td class="auto-style51"></td>
<td>
<asp:TextBox ID="TextBox26" runat="server"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td colspan="2">
</td>
</tr>
<input type="button" id="chosenlaunch" onclick="Chosen()" value="Equipments Purchased"/>
</table>
function Chosen() {
if (document.getElementById('cbconditioning').checked == true) {
alert("You Chose Air Conditioning");
}
if (document.getElementById('cbradio').checked == true) {
alert("You Chose Radio");
}
if (document.getElementById('cbrefrigeration').checked == true) {
alert("You Chose Refrigeration")
}
if (document.getElementById('cblaundry').checked == true) {
alert("You Chose Laundry")
}
if (document.getElementById('cbdishwasher').checked == true) {
alert("You Chose Dishwasher")
}
if (document.getElementById('cbtreatment').checked == true) {
alert("You Chose Treatment")
}
if (document.getElementById('cbhousewares').checked == true) {
alert("You Chose Housewares")
}
if (document.getElementById('cbothers').checked == true) {
alert("You Chose Others")
}
}