显示另一个按钮的onClick事件


Show button onClick event of another button

我需要在按钮的onClick事件之后显示状态。但是我希望显示的按钮在另一个页面上。这可能吗?

例如,我的调查页面上的一个按钮显示用户的患者状态。如果我点击该按钮,调查状态应该是Pending,并且该特定患者面前应该显示一个用户列表。

尝试使用jqueryHtml

 <button id="first-button" type="button" class="btn"> first button </button>
 <button id="second-button" type="button" class="btn hide"> Pending </button>
脚本

 $("#first-button").click(function(){
    ev.preventDefault();    
    $('#second-button').removeClass('hide');
    $('#first-button').addClass('hide');
  });

或php

<?php 
  if($pedding)
  {
    echo '<button id="pending" type="button" class="btn">Pending</button>';
  }
  else
  {
    echo '<button id="status" type="button" class="btn">Status</button>';
  }
?>