Phiên bản đầy đủ: jsB@nk » » Mẫu liên hệ
URL: https://www.javascriptbank.com/contact-form.html
Hiệu ứng tạo một trình liên hệ, đánh giá, xếp hạng website,... ở dạng đơn giản.
Phiên bản đầy đủ: jsB@nk » » Mẫu liên hệ
URL: https://www.javascriptbank.com/contact-form.html
<SCRIPT language=JavaScript type=text/javascript><!--function checkForm() { document.form.Email.value = " " + document.form.Email.value; if (document.form.Name.value == "") { // this part of the script is alert('The Name field is empty!'); return false; } // related to the Name field if (document.form.Company.value == "") { // this part of the script is alert('The Company field is empty!'); return false; } // related to the Company field if (document.form.Rate.selectedIndex == " ") { // this part of the script is alert('You have not rated my Site!'); return false; } // related to the Rate field mail = document.form.Email.value; // this part of the script is if ((mail.indexOf('@') == -1) || (mail.indexOf('.') == -1)) { alert('The E-mail address is invalid!'); return false; } // related to the E-Mail field if (document.form.Query.value == "") { // this part of the script is alert('The Comments / Query field is empty!'); return false; } if (document.form.Query.value.length > 250) { alert('The Comments / Query is too long!'); return false; } // related to the Comments field // the code prevents users from typing in more than 250 characters in the comment // field. The # can be modified by typing in any number instead of 250. If this // feature is not needed just delete the 2 lines in the code above. document.form.AppName.value = navigator.appName; document.form.AppVersion.value = navigator.appVersion; document.form.Resolution.value = window.screen.width + " X " + window.screen.height; window.setTimeout("history.back(-1)",2000); return true; }// --></SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=460> <TBODY> <FORM action="mailto:[email protected]?SUBJECT=Contact Form" encType=text/plain method=post name=form onsubmit="javascript:return checkForm()" ;><!-- change the E-Mail address and Subject line in the form field above --> <TR> <TD height=30 width=170><FONT color=#000000 face="verdana, arial, helvetica, sans-serif" size=2>Name: </FONT></TD> <TD height=30 width=290><INPUT name=Name size=30> <INPUT name=AppName type=hidden> <INPUT name=AppVersion type=hidden> <INPUT name=Resolution type=hidden> </TD></TR> <TR> <TD colSpan=2> </TD></TR> <TR> <TD width=170><FONT color=#000000 face="verdana, arial, helvetica, sans-serif" size=2>Company Name: </FONT></TD> <TD width=290><INPUT name=Company size=30> </TD></TR> <TR> <TD colSpan=2> </TD></TR> <TR> <TD><FONT face="verdana, arial, helvetica, sans serif" size=2>Rate my site:</FONT> </TD> <TD><SELECT name=Rate> <OPTION selected>Choose...</OPTION> <OPTION>Excellent </OPTION> <OPTION>Good</OPTION> <OPTION>Fair</OPTION> <OPTION>Poor</OPTION></SELECT> </TD></TR> <TR> <TD colSpan=2> </TD></TR> <TR> <TD><FONT face="verdana, arial, helvetica, sans serif" size=2>Like my site?</FONT> </TD> <TD><FONT face="verdana, arial, helvetica, sans serif" size=2>Yes: <INPUT CHECKED name=LikeForm type=radio value=Yes> No: <INPUT name=LikeForm type=radio value=No> </FONT></TD></TR> <TR> <TD colSpan=2> </TD></TR> <TR> <TD width=170><FONT color=#000000 face="verdana, arial, helvetica, sans-serif" size=2>E-mail: </FONT></TD> <TD width=290><INPUT name=Email size=30> </TD></TR> <TR> <TD colSpan=2> </TD></TR> <TR> <TD width=170><FONT color=#000000 face="verdana, arial, helvetica, sans-serif" size=2>Comments / Query: </FONT></TD> <TD width=290><FONT color=#000000 face="verdana, arial, helvetica, sans-serif" size=2><TEXTAREA cols=33 name=Query rows=7 wrap=virtual></TEXTAREA> </FONT></TD></TR> <TR> <TD colSpan=2> </TD></TR> <TR> <TD align=middle colSpan=2><INPUT type=submit value=Submit> <INPUT type=reset value=Reset> <INPUT onclick=history.back(-1) type=button value="<< Back"> </TD></TR></TR></FORM></TBODY></TABLE><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->