I have to create a function that will return a message box in the center of the screen with the information given by the user, however, such a message box has to be made using the div tag and Then the problem is living. Below is the code I am trying to implement.
<html>
<head>
<script>
function showMessage (msg) {
msg = prompt ('Digita Mensagem' );
$(document).ready(function() {
$("#div1").fadeIn(300).delay(3000).fadeOut(300);
});
}
</script>
<style>
#div1 {
background-color: #90EE90;
border-style: hidden;
border-color: #98FB98;
position: absolute;
left: 700px;
top: 400px;
}
</style>
</head>
<body>
<div id = "div1">
</div>
</body>
</html>