<h1>Gerador de link pro whatsapp</h1>
<form name="form_main">
  <label for="number">Número: </label>
  <input type="text" name="number" id="number"> <br>
  <label for="message">Mensagem: </label>
  <input type="text" name="message" id="message"> <br>
  <p id="end_url"></p>
  <button type="button" onclick="generateLink()">Gerar</button>
</form>
function generateLink() {
  let number = document.form_main.number.value;
  let message = document.form_main.message.value;
  let url = "https://wa.me/";
  let end_url = `${url}${number}?text=${message}`;
  document.getElementById('end_url').innerText = end_url;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.