What does the input type class=\"SendMail\" in the below code specify? Also does
ID: 3825425 • Letter: W
Question
What does the input type class="SendMail" in the below code specify? Also does the mailto statement cause your Outlook open?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Email</title>
</head>
<body>
<style> body {background-color: #FF0000}</style>
<center><img src="logo.png"></center>
<h3>Who do you want to send an email to?</h3>
<form method="get">
<input type="radio" name="sendto" id="faculty" value="Faculty">Faculty<br>
<input type="radio" name="sendto" id="student" value="Student"> Student<br>
</br>
<input type="button" class="SendMail" value="Submit">
</form>
</body>
</html>
<script type="text/javascript">
function myfunction()
{
if(document.getElementById("faculty").checked)
{
var email = 'faculty@rio.edu';
var subject = 'Question';
var emailBody = 'Enter Faculty members first initial and last name in place of faculty in email address';
document.location = "mailto:"+email+"?subject="+subject+"&body="+emailBody;
}
else if(document.getElementById("student").checked)
{
var email = 'sstudent#@students.rio.edu';
var subject = 'Question';
var emailBody = 'Enter Student Number in email after s in place of student# in email address';
document.location = "mailto:"+email+"?subject="+subject+"&body="+emailBody;
}
else
{
confirm("Make a selection.");
}
}
</script>
<p> Please wait for Microsoft Outlook to open up</p>
Explanation / Answer
1. SendMail class does not specify anything, it is a html class which can be used to identify the button or style it in stylesheet
2. Yes, mailto statement cause your Outlook open
Mailto link is a type of HTML link that activates the default mail client on the computer for sending an e-mail.
If you have Microsoft Outlook, for example as your default mail client, pressing a mailto link will open a new mail window
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.