Calling another page with bootstrap button is not working

Asked

Viewed 1,156 times

0

This very simple javascript does not work:

function Nova() {
            location.href = 'pme_beneficiarios.html';
        }

That’s the call on the button: <button type="button" class="btn btn-primary add-task" onclick="Nova();">Beneficiário</button>

1 answer

1


Try to put the window:

function Nova() {
        window.location.href = 'pme_beneficiarios.html';
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.