dsk920417 2015-04-02 07:27
浏览 219
已采纳

如何在php中禁用按钮? [关闭]

my question is how to make button disabled? I have two buttons on/off,i had already stored as off in table..when the users wants him to update the table,the webpage will display as the disabled button of off button.

  • 写回答

3条回答 默认 最新

  • 普通网友 2015-04-02 07:43
    关注

    Try the code:

    <?php
      $db_value = true or false; // put your database retrieved value here
      if($db_value == true ):
        echo '<button type="button" name ="myButton" disabled>OFF</button>'; 
      else:
        echo '<button type="button" name ="myButton">ON</button>'; 
      endif;
    ?>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退