Ciao, non se è quello che cercavi ma prova questo codice, e nell'eventualità potresti adattarlo al tuo problema. Ciao Ciao

codice:
<html>
<head>
<script type="text/javascript">
function selText()
  {
     stringa=document.getElementById("data").value;
     arrData=stringa.split("/");
     alert ("Giorno = "+arrData[0]);
     alert ("Mese   = "+arrData[1]);
     alert ("Anno   = "+arrData[2]);
  }
</script>
</head>
<body><form>
<input name="data" type="text" id="data" size="10">
<input type="button" value="Leggi data" onclick="selText()"> 
</form></body>
</html>