vendredi 1 juillet 2016

javascript: how to show value from checkbox

I have this HTML:

<form id="my form">
<input type="checkbox" name="interest" value="swim"/>
<input type="checkbox" name="interest" value="baseball"/>
<input type="checkbox" name="interest" value="basketball"/>
<input type="checkbox" name="interest" value="badminton"/>
<input type="checkbox" name="interest" value="running"/>
</form>

And I want to show the result in <p onclick=""></p>

How do I type javascript to reveal what I choose in "checkbox"?




Aucun commentaire:

Enregistrer un commentaire