Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

give call suggestions while clicking on a contact number in next js

<button onclick="myFunction()">
Call
</button>

function myFunction(){
var a = document.getElementById('input').value;
window.location.href = 'tel:' + a;
}

/*You can also view the live version on my website:
https://www.theharnishes.com/phone.html

Here we make a button and assign a function to it that bassically select the input, get the value, and the window.location.href will have the value of the input and it'll sent the url to call any number.
*/
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #give #call #suggestions #clicking #contact #number #js
ADD COMMENT
Topic
Name
7+4 =