如何在php中设计一个按钮 [英] how can desible a button in php
问题描述
<td><a class="edit" title="Accept" href="javascript:void()" onclick="get_accept(''<?php echo $data[''id''];?>'');" >Accept</a></td>
第一次单击后,如何从页面中禁用或消失此接受"按钮,因为我正在从该按钮发送时间戳记值,并且当用户在一段时间后单击此按钮时,它将获得新的时间戳记.
请帮忙. /pre>
第一次单击后,如何从页面中禁用或消失此接受"按钮,因为我正在从该按钮发送时间戳记值,并且当用户在一段时间后单击此按钮时,它将获得新的时间戳记.
请帮忙.
将按钮本身作为变量发送给函数.
< a onclick =" 类 =" 标题 接受" href #" < /a >
然后将其禁用或隐藏在您的javascript中.
功能 get_accept(数据,发件人) { sender.disabled = true ; // OR sender.styles.display = " ; }
<td><a class="edit" title="Accept" href="javascript:void()" onclick="get_accept(''<?php echo $data[''id''];?>'');" >Accept</a></td>
how can i disable or disappear this Accept button from the page after first click because i am sending a timestamp value from this button and when a user click this button after some time then it will get new timestamp.
please help.
data[''id''];?>'');" >Accept</a></td>
how can i disable or disappear this Accept button from the page after first click because i am sending a timestamp value from this button and when a user click this button after some time then it will get new timestamp.
please help.
Send the button itself as a variable to your function.
<a onclick="get_accept('<?php echo
data['id'];?>', this);" class="edit" title="Accept" href="#">Accept</a>
Then disable or hide it in your javascript.
function get_accept(data, sender) { sender.disabled = true; //OR sender.styles.display = "hidden"; }
这篇关于如何在php中设计一个按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!