Quantcast
Channel: Tópicos
Viewing all articles
Browse latest Browse all 14700

[Resolvido] array php to função javascript

$
0
0
ficheiro php
Código :
<?php
$arrayId=array();

for($i=0;$i<3:$i++)
{
array_push($arrayId, $i);
}
?>

<button type="button" onclick="verJS(<?php echo $arrayId ?>);">ver</button>

ficheiro js

Código :
funciton verJS(arr)
{
alert(arr);
}

nao da ... algum me ajuda sff
Obrigado

Viewing all articles
Browse latest Browse all 14700