How to create alert message with jquery

Posted by Jitendrasoft09 under jQuery on 6/27/2013 | Points: 10 | Views : 31807 | Status : [Member] [MVP] | Replies : 3
Hi All,
I want to understand How to create alert message with jquery, let me know if anybody knows.

Jitendra Kumar
If my post helps you, plz mark as an answer.



Responses

Posted by: Justshekhar123 on: 6/27/2013 [Member] Starter | Points: 25

Up
0
Down
To display alert message simple write the following function in Head tag in your page :

<script>
$(document).ready(function(){
$("button1").click(function(){
$("Panel1").hide("slow",function(){
alert("The paragraph is now hidden");
});
});
});
</script>

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: manoranjanguptaoutlook-19221 on: 6/28/2013 [Member] Starter | Points: 25

Up
0
Down
hello
http://stackoverflow.com/questions/11474138/jquery-how-do-i-add-an-alert-message-to-this-jquery-code-base@refersite

$(document).ready(function () {
$('input.numberinput').bind('keypress', function (e) {

if((e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) )
{
alert('Only Numbers');
return false;
}
else{
return true;
}
});
});

Manoranjan Gupta Manu
9873306227

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raj.Trivedi on: 6/29/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
alert("Alert Called");
});
});

</script>
</head>
<body>
<input id="button" type="submit" value="Call alert"/>
</body>
</html>

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response