function Unidades() {
    // Get the form element
    const form = document.getElementById('myForm');

    // Save the table data to localStorage
    localStorage.setItem('tabla', myData.innerHTML);

    // Add a submit event listener to the form
    form.addEventListener('submit', function (event) {
        event.preventDefault(); // Prevent the default form submission behavior

        // Get the form data
        const formData = new FormData(form);

        // Now, you can navigate to the next HTML page (HTML contract)
        // You can use JavaScript to redirect to the next page, e.g., using window.location.href
        // Replace 'next_page.html' with the actual URL of your contract page
        window.location.href = 'https://agata.financial/legal/inversiones/contrato_credito.html';
    });
}
