// Get references to the HTML elements
const input = document.querySelector('#url-input');
const submitBtn = document.querySelector('#submit-btn');
const output = document.querySelector('#output');
// Listen for the submit button click event
submitBtn.addEventListener('click', () => {
// Get the value of the input field
const url = input.value.trim();
// Use fetch() to retrieve the HTML content of the website
fetch(url)
.then(response => response.text())
.then(html => {
// Define a regular expression to match image URLs
const imageRegex = / console.error(error));
});