I am using a simple form and I want to allow the user to confirm before the form submits... I know this would be easy using jQuery, but I am a bit confused about code...
$(function() {
$(".testform").submit(function() {
$('.submitbtn').text('confirm');
});
});
I know that the above code is not complete and I would like your help to finish it, so it would give an alert (using jQuery alert) that says 'Please confirm if everything is correct' and changes the text on the submit button to "confirm" instead of "submit". If the user clicks confirm again it would submit the form. I hope this makes sense. thanks.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…