foreach ($_SESSION['songlist']['items'] as $key => $value1) {
$id = $value1['id']['videoId'];
session_start();
$_SESSION['id'] = $id;
echo "<br>";
echo "<iframe src='//www.youtube.com/embed/$id?enablejsapi=1' frameborder='0' allowfullscreen id='video'></iframe>";echo "<br>";
echo '<div id="Added" style="display:none;">ADDED!</div>';
echo "<form id='demo' method='POST' action=''><button type='button' name='button' id='$id' method='POST' onclick='Count($id)'>Add to playlist</button></form>";
}
这是我的按钮
我想使用js onclick函数为不同的按钮设置一个单独的计数器。