0
<div id="pop2" class="box2" style="display: none">
<form action="" method="post">
<div class="second" style="margin-top:3px;margin-left:10px;font-size:100%">Add to</div>
<?php
$new2=array();
$new2=getlist();
foreach($new2 as $value){
echo'<input type="radio" id="qwerty" name="qwerty" value="'.$value.'" onclick="theLast()" />';
echo"$value";echo"<br>";}
?>
<hr>
<button type="button" id="add2" class="new" onclick="theFinal()" >Create new list</button>
</form>
</div>
と私はのために同じid
属性を持つ私はphpを使って動的チェックボックスを作成しましたが、チェックするために.checked()を使うと最初のラジオボタンだけがチェックされています。残りの部分をチェックする方法は?
ありがとうございましたが、うまくいかなかった – Rahul
あなたの更新コードを投稿できますか? – IzzEps
echoステートメントでidの代わりにclassを追加しました。 getElementByClassName – Rahul