电脑技术学习

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

dn001
<!-- 把下面代码放到<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@knowsky.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>