Jump to content

<a href=# onclick problem> for check all function


robert_gsfame

Recommended Posts

i have this

<table>

<tr>

<td><input type = checkbox id=1></td>

<td><input type = checkbox id=2></td></tr>

<tr>

<td><input type = checkbox id=3></td></tr>

</table>

<table>

<tr><td><?php echo "<a href=# onclick='for(i=0;i<3;i++){

document.getElementById(+i).checked=true;}'>Check all</a>";?></td></tr>

</table>

 

not working, which part is wrong?? can anyone help

Link to comment
https://forums.phpfreaks.com/topic/182878-for-check-all-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.