javascript - Call number on page load / document ready -
i need create blank webpage url like: https://www.example.com/callme , share link our customers.
when clicks link, blank page load, , document ready or dom content loaded, has automatically dial specific number on mobile devices.
can link tag href "tel:xxxxx", need automatically clicked when page load, not click/tap manually.
here tried far no success:
document.addeventlistener('domcontentloaded', function() { $('#call').trigger('click'); }, false);
and
$(document).ready(function(){ $('#call').click(); });
and
$(document).ready(function(){ $('#call').trigger('click'); });
and here simple html:
<a href="tel:142;" id="call">call me</a>
any advice appreciated, in advance
simply include one-liner change client's url tel
-link
window.location.href="tel:123456789";
if on device has handler tel
-links (a mobile-phone example) phone app open , give them opportunity call you
Comments
Post a Comment