<!DOCTYPE html>
<html>
<body>

<p>Click the button to set the href value to link to a specified mail address (will only work if you have mail installed).</p>

<button onclick="myFunction()">Send mail</button>

<script>
function myFunction() {
    location.href = "mailto:someone@example.com";
}
</script>

</body>
</html>