Write a JavaScript program to create email id after entering first name, middle name and surname.
Write html script that displays textboxes for accepting name, middlename, surname of the user and a submit button. Write proper JavaScript such that when the user clicks on submit button.
i) all texboxes must get disabled and change the color to “red”. and with respective labels.
ii) constructs the mailid as
<html>
<head>
<title>Create MSBTE email id</title>
<script>
function constructMailId()
{
var fn = document.getElementById('fname').value
var sn = document.getElementById('sname').value
var email = fn.toLowerCase() + "." + sn.toLowerCase() + "@msbte.com"
alert('Your mailID is: ' + email)
}
</script>
</head>
<body>
<form name="myform">
<p>
First name <input type="text" id="fname"/><br/>
Surname <input type="text" id="sname"/><br/>
<input type="button" value="Submit" onclick="constructMailId()"/>
</p>
</form>
</body>
</html>
