Hi Firuz,
I have made a sample that full-fill your requirement.
HTML
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
function CheckPassword() {
var pwd = document.getElementById("txtpwd").value;
if (pwd.length == "") {
alert("Please Enter password");
}
else if (pwd == "123") {
alert("You have entered 123");
}
else {
alert("You have entered: " + pwd);
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="text" id="txtpwd" />
<br />
<input type="button" name="btnCheck" value="Check" onclick="return CheckPassword();" />
</div>
</form>
</body>
</html>
Demo