Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

163
Visualizações
Creating a dynamic hyperlink that opens in a specific browser

< div class="last-call-number ng-binding ng-scope" ng-if="lastCall.number.length != 10 && lastCall.number.length != 11">+12345678910

I want to modify this into a dynamic href link. I need to take the phone number which appears to be stored in the javascript as last-call-number and put it at the end of a url minus the +1 to look something like:

< a href="microsoft-edge:http://myurl.com/2345678910">

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

You can do this

If u have an input

const anchor = document.getElementById("anchorID");
const input = document.getElementById("inputID");

input.addEventListener('change', (e) => {
    anchor.setAttribute('href', `microsoft-edge:http://myurl.com/+1${e.target.value}`);
});

Else

    const anchor = document.getElementById("anchorID");
    const span = document.getElementById("ID");
    
    anchor.setAttribute('href', `microsoft-edge:http://myurl.com/+1${span.innerHTML}`);
about 4 years ago · Juan Pablo Isaza Relatório

0

You can use template literals like this:

let last_call_number = '+12345678910'
// Splitting the string depends on the use case. You can also capture the last 10 digits of the number.
let number = last_call_number.split('+1')[1]

let url = `microsoft-edge:http://myurl.com/${number}`
console.log('URL:', url)

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda