Survey Form Using Events in javascript #140456
Unanswered
Abanou6
asked this question in
Programming Help
Replies: 2 comments 1 reply
-
Hi @Abanou6 Thanks for posting! Can you please add a small paragraph explaining what feedback you would like. Adding a repo link with your test code could be super helpful as well. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hey @Abanou6, thanks for being a part of the GitHub Community! Looks like your issue may be resolved by changing |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
<title>Luxury Brand Feedback</title>Welcome to Luxury Brand Products Feedback
Provide Your Feedback
Name:Age:
Email:
Job:
Designation:
Product Type:
Perfume Cream Oils
Feedback:
<textarea id="feedbackText" rows="5" cols="30" placeholder="Enter your feedback here" required></textarea>
Submit Feedback
User Information:
Name:
Age:
Email:
Job:
Designation:
Feedback for :
function submitFeedback(){
alert('Thank you for your valuable feedback');
document.getElementById('userInfo').style.display = 'block';
document.getElementById('userName').innerHTML = username;
document.getElementById('userAge').innerHTML = age;
document.getElementById('userEmail').innerHTML = email;
document.getElementById('userJob').innerHTML = job;
document.getElementById('userDesignation').innerHTML = designation;
document.getElementById('userProductChoice').innerHTML = productType;
document.getElementById('userFeedback').innerHTML = feedbackText;
}
const username = document.getElementById('name').Value;
const age = document.getElementById('age').Value;
const email = document.getElementById('email').Value;
const job = document.getElementById('job').Value;
const designation = document.getElementById('designation').Value;
const productType = document.getElementById('productType').Value;
const feedbackText = document.getElementById('feedbackText').Value;
const submitButton = document.getElementById('submitBtn');
submitButton.onclick = submitFeedback;
document.addEventListener('keydown', function(event){
if (event.key==='Enter'){
submitFeedback();
}
});
Beta Was this translation helpful? Give feedback.
All reactions