Hi all
I want to access hidden values by javascript
what's wrong on bellow code:
<html>
<head>
<script language="javascript">
function func(i)
{
var x=document.form1.array.value;
alert(x);
}
</script>
</head>
<body>
<form method=post name=form1>
<?php
for($i=1;$i<100;$i++)
{
echo "<input type=hidden name=array[$i] value=$i>";
echo "<input type=button onclick=func($i) value=$i>";
}
?>
</form>
</body>
</html>