I'm looking for a way to use JavaScript to open texts on ios or android when a link is clicked. Currently, you can use the mailto
links in HTML to mail a link and open the link in an empty email. I'm wondering how I can do the same using text. For example, a user clicks and button and it will open the messages app and auto-fill with some information similar to the mailto
only for messages. How can this be done?
Current code:
<button onclick="text()">text message</button>
<script>
function text() {
//Code for text messages
}
</script>