当我单击添加新按钮(WORDPRESS,PHP)时,我需要在表格中隐藏<tr>


I need to Hide <tr> in a table when i click Addnew button(WORDPRESS,PHP)

   Add new button

<div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
    <h2><?php _e('Collaboration', 'custom_table_example')?> <a  class="add-new-h2" id=" add_new"
    href="<?php echo get_admin_url(get_current_blog_id(),   'admin.php?page=persons_form');?>"><?php _e('Add   new','custom_table_example')?> </a>
 </h2>

    (Need to hide) 
-----------------------------------------
 <tr class="form-field" id="appid">
    <th valign="top" scope="row">
        <label for="Application_ID"><?php _e('Application ID',  'custom_table_example')?></label>
    </th>
    <td>
  </tr>
 </tbody>
</table>

单击"添加新按钮"时如何隐藏?
我不能直接隐藏或显示:无,因为"编辑并添加新"使用相同的 form.so 单击添加新的我需要隐藏表格行
我也尝试过给点击函数(Javascript("document.getElementById("appid"(.style.display = 'none';">
我仍然没有得到任何回应。
你们谁能帮我吗!!提前
致谢 参考此链接 wordpress-custom-database-table-example-full

尝试添加以下 JavaScript 代码

<script type="text/javascript">
  document.getElementById("add_new").addEventListener("click", function(event){
    document.getElementById("appid").style.display = 'none';
    event.preventDefault()
});
</script>