Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

basic HTML,CSS,js

Zhen 240

@ZSHenChan

Desktop design screenshot for the Interactive card details form coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


I was wondering if there is a simple way of auto-formatting the card number input from users without using frameworks (i.e. auto-spacing 4-digit numbers)

Community feedback

P

@james-rod

Posted

Hello, here a tip,

You should add an input event listeners as it is an effective way to achieve this as well as a combination with the innerHTML property to update the content of card containers. The input event listener on the button triggers the update of the card container's content when the button is clicked. The innerHTML property is used to replace the existing content with the new content generated from the user's input and dynamic numbers.

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord