Adding new input fields on check box ticked

I have a table with 3 text fields
i want to add the same text fields on clicking check box i have the following code
how can i do it with php and javascript

 echo "<td>Screen ".$i."</td>";
                       echo "<td><input type='text' id='filmname".$k."' name='filmname".$k."'value='".$prefilm."'></td>";
                       echo "<td><input type='text' id='Language".$k."' name='Language".$k."'value='".$prelang."'></td>";
                       echo "<td><input type='text' id='showtime".$k."' name='showtime".$k."'value='".$prescreen."'></td>";
                       
 echo "<td ><input type='checkbox' class='Checkbox' id='addshow".$k."' autocomplete='off'
                       name='addshow".$k."' value='addshow' onclick='addshow(".$k.")</td>";