ahmed0saber

Send WhatsApp msg in HTML , JS

Nov 21st, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <title>WhatsApp msg</title>
  4. <script>
  5. function send(){
  6. x="https://api.whatsapp.com/send?phone=";
  7. abc=x.concat(document.getElementById("a1").value,"&text=",document.getElementById("b1").value);
  8. window.open(abc);}
  9. </script>
  10. </head>
  11. <body>
  12. <div>
  13. <fieldset>
  14. <legend>Message</legend>
  15. <input type="text" placeholder="phone number" id="a1" value=""/><br/>
  16. <textarea rows="10" cols="20" placeholder="Type your msg here..." id="b1" value=""></textarea><br/>
  17. <button onclick="send()" value="Send">send</button>
  18. </fieldset>
  19. </div>
  20. </body>
  21. </html>
Advertisement
Add Comment
Please, Sign In to add comment