<html>
<head>
<?php
mysql_connect('localhost','root','');
mysql_select_db("popup");
$res = mysql_query("select * from place");
$num = mysql_num_rows($res);
?>
<script type="text/javascript">
<?php while ($dsatz = mysql_fetch_assoc($res)){ ?>
var urls=<?php $dsatz["web"]; ?>;
<?php } ?>
function popups_oeffnen(){
var urls_anz=<?php echo $num; ?>;
for (i=0;i<urls_anz;i++){
if (urls[i]!=""){
window.open(urls[i],'PopUp_' + i,'width=400,height=400');
}
}
}
</script>
</head>
<body>
<input type="button" onclick="return popups_oeffnen();" value="Öffnen" />
</body>
</html>
我什么也没得到,为什么?