如何在弹出式窗口中重定向我的网址?
$array[] = array ('id' => "$id", 'title' => "$evento", 'start' => "$dtevento2", 'end' => "$dtfim2", 'url' => "/eventos.php?id=$id", 'allDay' => "false");
我有弹出窗口的JavaScript代码
<script language=javascript>
var win = null;
function NovaJanela(pagina,nome,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(pagina,nome,settings);
}
</script>
使用代码的链接
<a href="eventos.php?id=<? echo $id; ?> "onclick="NovaJanela(this.href,'nomeJanela','620','500','no');return false">Open</a>
答案 0 :(得分:0)
array('a' => 'Just' , 'b'=>'Persian Gulf');...
// output
// a='Just',b='Persian Gulf'...
你的意思是吗?
<?php
$array = array('a' => 'Just' , 'b'=>'Persian Gulf');
$keyy=array();
//
while(key($array)){
array_push($keyy,key($array));
next($array);
}
foreach($keyy as $ke)
echo $ke."='$array[$ke]' ,";
?>
可在所有地方使用......
答案 1 :(得分:0)
<?php
foreach($array as $arr){
?>
<a href="<?php print($arr['url']); ?>" onclick="NovaJanela(this.href,'nomeJanela','620','500','no');return false">Open</a>
<?php } ?>
我认为你正在寻找这个。我希望你有个主意。