JavaScript编制留言簿程序代码
更新时间:2008年09月08日 21:07:57 作者:
也许你有一个很酷的主页,很希望与人分享。同时,你希望访问你主页的人能对你的主页提供一些意见和建议,或者你对某个主题感兴趣,而希望客人也许能给你一帮助,这就要用到留言簿。留言簿使得你能与每一个访问你主页的人交换信息。
function isFavorite() {
if (document.forms[0].elements[5].value == "") {
if (confirm("nYou're about to submit without
listing your favorite sites.nnClick on CANCEL
to include favorites.nnClick on OK to continue
without listing favorites."))
return true
else
{
document.forms[0].elements[5].focus();
return false;
}
}
else
return true
}
// End -->
</SCRIPT>
</HEAD>
<BODY>
<CENTER>
<FORM ENCTYPE="text/plain"
NAME="mail" METHOD='GET'
ACTION='mailto:Someone@abc.com'
onSubmit="return submitForms()">
<TABLE BORDER=0 WIDTH=400>
<TR>
<TD align="center"> <FONT COLOR=800000>
<STRONG>Enter your name:</STRONG></FONT></TD>
<TD align="center"> <FONT COLOR=800000>
<STRONG>Enter your e-mail address:< /STRONG>
</FONT></TD>
</TR>
<TR>
<TD align="center"> <INPUT TYPE="text"
NAME="name" SIZE=30 MAXLENGTH=40 ></TD>
</TD>
<TD align="center"> <INPUT TYPE="text"
NAME="email" SIZE=30 MAXLENGTH=40></TD>
</TR>
<TR>
<TD align="center"> <FONT COLOR=800000>
<STRONG>Your browser </STRONG></FONT></TD>
<TD align="center"> <FONT COLOR=800000>
<STRONG>Enter your country:</STRONG></FONT></TD>
</TR>
<TR>
<TD align="center"> <INPUT TYPE="text" NAME="browser" SIZE=30 MAXLENGTH=60></TD>
<TD align="center"> <INPUT TYPE="text" NAME="country" SIZE=30 MAXLENGTH=60>
</TD>
</TR>
</TABLE>
<CENTER>
<FONT COLOR=800000><STRONG>
Leave a comment or suggestion:</strong> </font><BR>
<TEXTAREA NAME="comments"
ROWS=5 COLS=50 wrap=yes>Comments?
Suggestions?</TEXTAREA><P><P>
<FONT COLOR=800000><STRONG>
List your favorite sites:</STRONG></FONT><BR>
<TD align="center"><TEXTAREA NAME="favorites" ROWS=5 COLS=50 wrap=yes>
Any sites I should take a look at?</TEXTAREA>
<P><P>
<INPUT TYPE="submit" VALUE="Submit">
<center><INPUT TYPE="reset" VALUE="Reset"
onClick="Reset()">
</FORM>
</CENTER>
</BODY>
</HTML>
最新评论