运行 ❯
获取您的
自己的
网站
×
更改方向
保存代码
更改主题,暗/亮
前往 Spaces
<!DOCTYPE html> <html> <body> <h1>The Window Location Object</h1> <h2>The href Property</h2> <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>