Codice PHP:
<html>
<
head>
<
script type="text/javascript" >
function 
Rubrica (p,n) {
x=p.value;
y=n.value;
document.write(y);
 
nomi = new Array ();
 
numeri = new Array ();
this.inserisci = function (x,y)
{
this.nomi[this.nomi.length] = x;
window.alert(this.nomi[this.nomi.length]);
this.numeri[this.numeri.length] = y;
}

this.cerca = function (p)
{
for (var 
0i<= this.nomi.lengthi++){
if (
this.nomi[i] == p)
window.alert ("Nome"+this.nomi[i], +"Numero"this.numeri[i]);
}

}
</script>
    <title></title>
</head>

<body>
<form name="s" >
<input type="text" name="p">Nome


<input type="text" name="n">Numero
<input type="button" value="prova" onclick="
Rubrica(p,n);
"/>

</form>


</body>
</html> 
ho modificato qualcosa ma non va lo stesso