const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); const url_choosecountry = urlParams.get('choosecountry'); if( url_choosecountry == 1 ) { $('#modal_countries').modal('show'); }