我正在尝试设置个人品牌页面。我有颜色框库,datepicker和验证表单工作,但他们只是随机决定停止工作。这是我的代码:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>References</title>
<link type="text/css" rel="stylesheet" href="CSS/Reference.css">
<script type="text/javascript" src="jquery-ui-2.2.4/jquery-2.2.4 (1).js"></script>
<script type="text/css" src="jquery-ui-1.11.4.custom/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css"></script>
<script type="text/javascript" src="jackmoore_colorbox/colorbox-master/jquery.colorbox.js"></script>
<script type="text/javascript" src="jquery_validate_min/dist/jquery.validate.min.js"></script>
<!-- Google Code for Resume webite Conversion Page -->
<script type="text/javascript">
$(document).ready(function() {
var validation = $("myform").validate(
{
rules: {
name: { required: true, minlength: 2 },
email: { required: true, email: true },
company: { required: true, url: true },
contactreason: { required: true, checked: true},
message: {required: true, minlength: 1}
}
});
});
</script>
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-77421138-2', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<script type="text/javascript">
$(document).ready(function) {
$(".slideshow").colorbox({rel:'slideshow'});
$(".gallery").colorbox({rel:'gallery'});
$(".datepicker").datepicker({dateFormat: "mm-dd-yy"}).val();
$(".datepicker1").datepicker({dateFormat: "mm-dd-yy"}).val();
$(".contactform").validate()
});
</script>
<div class="navigation">
<ul>
<li><a href="About_Me_Page1.html" title="About Me">About Me</a></li>
<li><a href="Resume_page.html" title="Resume Page">Resume</a></li>
<li><a href="References_page.html" title="Reference Page">References</a></li>
</ul>
</div>
<h1>References</h1>
<div class="portfolio">
<h4>Portfolio</h4>
<a class="slideshow" href="portfolio/Facebook_Page1.jpeg"><img alt="Facebookpage" src="thumbnails/JPEG/Facebook_Page1.jpg">Facebook
</a>
</div>
<div class="portfolio">
<a class="slideshow" href="portfolio/Bryan's_logo.jpg" title="Logo"><img alt="Logo" src="thumbnails/JPEG/Bryan's_logo.jpg">Logo
</a>
</div>
<div class="portfolio">
<a class="slideshow" href="portfolio/NASCAR_Questionaire.jpeg" title="Questionaire"><img alt="Nascar" src="thumbnails/JPEG/NASCAR_Questionaire.jpg">Nascar
</a>
</div><br>
<div class="references">
<h4>References</h4>
<a class="gallery" href="references/Recommendation3.jpeg" title="Steve"><img alt="Steve" src="thumbnails/JPEG/Recommendation3.jpg">Steve's Reference</a>
</div>
<div class="references">
<a class="gallery" href="references/Recommendation1.jpeg" title="Amanda"><img alt="Amanda" src="thumbnails/JPEG/Recommendation1.jpg">Amanda's Reference</a>
</div>
<div class="references">
<a class="gallery" href="references/Recommendation2.jpeg" title="Kristine"><img alt="Kristine" src="thumbnails/JPEG/Recommendation2.jpg">Kristine's Reference</a>
</div>
<form class="contactform" onsubmit="return validateForm()" action="MAILTO:bryan.sayles@hotmail.com" method="post" enctype="text/plain">
<fieldset>Contact Form<br>
<label>Name</label>
<input class="required" type="text" name="name" size="50"><br>
<label>E-mail</label>
<input class="required email" type="text" name="e-mail" size="50"><br>
<label>Company</label>
<input class="required" type="text" name="company" size="50"><br>
<Label>Contact Reason</label>
<input class="required" type="radio" name="Contactreason"> Interview
<input class="required" type="radio" Name="Contactreason">Contract Work
<input class="required" type="radio" name="Contactreason">Website Input<br>
<Label>Date From</Label>
<input type="text" class="datepicker">
<Label class="date">Date To</Label>
<input type="text" class="datepicker1"><br>
<label>Message</label>
<textarea class="required" name="Message" cols="50" rows="20"></textarea><br>
<input id="submit" type="submit" value="submit">
</fieldset>
</form>
<div class="footer">
<a href="https://www.linkedin.com/in/bryansayles" title="Linkedin">
<img class="socialmedia" src="http://upload.wikimedia.org/wikipedia/commons/c/ca/LinkedIn_logo_initials.png" alt="Linkedin"></a>
<a href="https://twitter.com/BryanSayles" title="Twitter">
<img class="socialmedia" src="http://vignette2.wikia.nocookie.net/community-sitcom/images/3/3d/Twitterlogo.png/revision/latest?cb=20121018102426" alt="Bryan's Twitter Feed">
</a>
<a href="https://plus.google.com/u/0/109699195073449318725/about" title="Google Plus">
<img class="socialmedia" src="http://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Google_plus.svg/1047px-Google_plus.svg.png" alt="Google Plus">
</a>
</div>
</body>
</html>
我也试图在点击提交按钮时将联系表单发送到我的电子邮件。现在它打开了一个邮件服务器,并要求访问者手动将它发送给我。为了让这个javascript工作,我需要更改为我的代码?谢谢你的帮助。