<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <!-- Bootstrap -->
<title>Sean Kim</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-min.css">
<!--<![endif]-->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link type="text/css" rel="stylesheet" href="css/stylesheet.css">
<script src="js/jquery-2.1.4.min.js"></script>
</head>
<body>
<div class="custom-menu-wrapper">
<div class="pure-menu custom-menu custom-menu-top">
<a href="#" class="pure-menu-heading custom-menu-brand">Sean Kim</a>
<a href="#" class="custom-menu-toggle" id="toggle"><s class="bar"></s><s class="bar"></s></a>
</div>
<div class="me" id="home">
<br><br><br>
<h1 class="name">SEAN KIM</h1>
<hr>
<h6 class="intro">14 year-old programmer/student at Bergen County Academies</h6>
<div class="element"></div>
<img src="images/nyc.jpg" class="img-responsive nyc">
</div>
<div id="about">
<h2 class="about-text">About Me</h2>
<img src="images/golf.png" align="left"class="propic">
<p class="info">My name is Sean Kim and I'm a freshman at
<a href="http://bcts.bergen.org/index.php/bergen-county-academies" class="bca">
Bergen County Academies
</a> in the Academy of Technology and Computer Science (ATCS).
</p>
</div>
<div id="skills">
<h2 class="skills-text">Skills</h2>
<div class="pure-g">
<div class="pure-u-1 pure-u-md-1-4 html5">
<img src="images/logos/html5.png" alt="HTML 5" width="106" height="150">
<p class="languages">HTML 5</p>
</div>
<div class="pure-u-1 pure-u-md-1-4 css3">
<img src="images/logos/css.png" alt="CSS3" width="106" height="150">
<p class="languages">CSS3</p>
</div>
<div class="pure-u-1 pure-u-md-1-4 python">
<img src="images/logos/python.png" alt="PYTHON" width="150" height="150">
<p class="languages">PYTHON</p>
</div>
</div>
</div>
</div>
<div class="contact-container" id="contact">
<h2 class="contact-text">Contact Me</h2>
<div class="pure-g contact">
<div class="pure-u-1 pure-u-md-1-4 Facebook">
<a href="https://www.facebook.com/seankim327" target="_blank" class="icon">
<i class="fa fa-facebook-square fa-5x"></i>
</a>
</div>
<div class="pure-u-1 pure-u-md-1-4 Instagram">
<a href="https://www.instagram.com/seankim.co.kr" target="_blank" class="icon">
<i class="fa fa-instagram fa-5x"></i>
</a>
</div>
<div class="pure-u-1 pure-u-md-1-4 Twitter">
<a href="https:/www.twitter.com/sean_d_kim" target="_blank" class="icon">
<i class="fa fa-twitter-square fa-5x"></i>
</a>
</div>
<div class="pure-u-1 pure-u-md-1-4 GitHub">
<a href="https://github.com/seankim327" target="_blank" class="icon">
<i class="fa fa-github-square fa-5x"></i>
</a>
</div>
</div>
<script>
function sendMail(email, subject, content) {
$.ajax({
type: 'POST',
url: 'https://mandrillapp.com/api/1.0/messages/send.json',
data: {
'key': 'goYVUvLoJH3ICbEMgIA-ow',
'message': {
'from_email': email,
'to': [
{
'email': 'seandyk@gmail.com',
'name': 'Sean Kim',
'type': 'to'
}
],
'autotext': 'true',
'subject': subject,
'html': content
}
}
}).done(function(response) {
if (response[0].status == "rejected") {
document.getElementById("<div id="about"></div>").innerHTML = "Please enter valid fields";
} else {
document.getElementById("<div id="skills"></div>").innerHTML = "Sent!";
}
});
}
</script>
</div>
</body>
</html>
我让擅长 JavaScript 的 friend 为我编写可以发送电子邮件的代码,所以他使用 Mandrill API 为我编写了一个。但他告诉我更换<Empty Div>
与“空 div
s”或者我需要一个 span
输出到.我不知道这意味着什么。有人可以帮忙吗?
最佳答案
空 div 是同时具有打开和关闭但在打开和关闭之间没有内容或其他元素作为内容的 div。
您的 friend 在代码中提到的相关 Div 是:
<div class="element"></div>
它位于包含文本的行的正下方
14 year-old programmer/student at Bergen County Academies
关于javascript - 如何处理 <Empty Div>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32131843/