0
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 message box has to be done using the tag div And that’s where the problem is. Below is the code that I’m 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>
Running from the site, gives a good one, but when you mount the code in the IDE the message is not being displayed. It may be the order that is wrong?
– Gabriel
Which IDE? Does not display text or open prompt?
– Leandro Angelo