要完成此效果需要两个步骤 第一步:把如下代码加入到<head>区域中 <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function initMail(form) { text = "Check out this page: " + window.location; form.message.value = "Hi " + form.sendto.value + " (" + form.to.value + "):/n/n" + text + "/n/nYour Friend,/n" + form.sendername.value + "(" + form.senderemail.value + ")"; return (form.to.value != ""); } // End --> </script> 第二步:把如下代码加入到<body>区域中 <center> <form name=emailform method=post action="http://cgi.freedback.com/mail.pl" target="_new" onSubmit="return initMail(this);"> <input type=hidden name=subject value="** Check Out This Site! **"> <input type=hidden name=message value=""> <table> <tr> <td colspan=2 align=center>告诉你的朋友到这儿来!</td> </tr> <tr> <td>他的名字:</td> <td><input type=text name=sendto></td></tr> <tr> <td>他的mail:</td> <td><input type=text name=to></td></tr> <tr> <td>你的名字:</td> <td><input type=text name=sendername></td></tr> <tr> <td>你的mail:</td> <td><input type=text name=senderemail></td></tr> <tr><td colspan=2 align=center><input type=submit value="Ok!"></td></tr> </table> </form> </center>