GRACIAS.
<script language="javascript">
var cve = [];
<?
require ("conecta.php");
$sql = "Select clave, area, titular from claves";
$datos = mysqli_query($conectado, $sql);
while($row=mysqli_fetch_array($datos, true)){
echo "cve.push({Clave:".$row['clave'].", Area:".$row['area'].", Titular:".$row['titlar']."})";
}
?>
for (x=0; x<cve.length; x++){
document.write(cve[x] + " ");
}
</script>