✔ 最佳答案
On the checkbox,
type:
onClick="javascript: alert(this.value) "
OR, you may first create a function to check if the user check the checkbox or unselect it.
function XXX(what) {
if (what.checked == true) {
alert ("You have selected" + what.value);
} else {
// any action you like
}
input type="checkbox" ... onClick="XXX(this)"