与使用<a>
标签的,我可以把这样的:的JavaScript的onClick HREF
<a href="include/sendemail.php?id_user=<?= $_GET['id_user'];?>" onclick="return confirm('Are you sure want to send an email?');" >Send Email</a>
,以及如何做到这一点的代码应用到按钮:
<input type="button" onclick="return confirm('Are you sure want to send an email?');" value="Send Email" >
你有什么工作。它在做什么/不做你不指望的事情? – 2011-03-14 11:16:04
*(旁注)*事件属性被认为是不好的做法。 [试着让它们不显眼。](https://secure.wikimedia.org/wikipedia/en/wiki/Unobtrusive_JavaScript) – Gordon 2011-03-14 11:21:32
你是否设法解决这个问题? – 2011-03-14 11:21:38