<html>
<head>
<script type="text/javascript">
function va()
{

var a=document.getElementById("pwd").value;
var b=document.getElementById("pwd1").value;


if(a.length==6 || a.length==7 || a.length==8 || a.length==9 || a.length==10)
{

if(a==b)
alert("password match");
else
alert("password did not match");
}
else
{
alert("Enter password betweeen 6-10 charcters");
}

}







</script>
</head>

<body>
<form id="f1">
password <input type="password" id="pwd" />
confirm <input type="password" id="pwd1" />

<input type="button" name="Confir" value="Submit" onclick="va()"/>

</form>



</body>