<form action="test.php" onsubmit="return(document.getElementById('flag').checked)?confirm('Вы уверены?'):false"> <input name="a"> <input type="checkbox" id="flag"> ok? <input type="submit" value="ok"> </form>