首页 > 网站 > WEB开发 > 正文

一个有提示的发信程序,按钮和链接都可以,很直观

2024-04-27 13:57:31
字体:
来源:转载
供稿:网友
<!-- 把下面代码放到<body>区域中: -->
 <script>
mailsys="Netscape mail";
var author="Jon Eyrick";
if (author == "Jon Eyrick"){ 
phrompt=PRompt; 
snarkconf=confirm;
}
function mailsome1(){ 
who=phrompt("Enter a friend's email address: ","web@vevb.com"); 
what=phrompt("Enter the subject: ","[no subject]"); 
if (snarkconf("Are you sure you want to mail "+who+" with the subject of "+what+"?")==true)
{  
parent.location.href='mailto:'+who+'?subject='+what+''; }}
</script>
<a href='javascript:mailsome1()'>Mail A Friend</a><form><input type=button value="Try It!" onClick="mailsome1()"></form>
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表