How It Works:
1. Form Submission: When the user submits the URL, the form is prevented from reloading the page, and the shortenUrl function is called with the input URL.
2. API Request: The tool sends a request to the https://api.shrtco.de API to shorten the entered URL.
3. Display Result: Once the shortened URL is received, it is displayed on the page as a clickable link.
This code is fully responsive, simple, and functional, making it easy to shorten URLs with colorful and modern styling.
No comments:
Post a Comment