Php 如何让一个按钮执行两个操作?
是否可以让一个“保存”按钮执行这两个操作 行动1:Php 如何让一个按钮执行两个操作?,php,Php,是否可以让一个“保存”按钮执行这两个操作 行动1: <td> <?php $target = TRoute::_("index.php?option=com_adsmanager&task=save"); if ($this->nbcats == 1) { $this->displaySingleCatChooser(@$this->content->id,$this->conf,"com_adsm
<td>
<?php
$target = TRoute::_("index.php?option=com_adsmanager&task=save");
if ($this->nbcats == 1)
{
$this->displaySingleCatChooser(@$this->content->id,$this->conf,"com_adsmanager",$this->cats,$this->catid);
}
?>
</table>
行动2:
<input type="button" onclick="countDown(this.form)" value="SAVE"><p>
提前感谢。请解释每一项功能。您可以调用JavaScript函数,然后通过AJAX调用PHP。操作1将输入的信息保存到表单中并打开一个新页面。动作2启动计数器。我想看到计数器也出现在新的页面上;看起来我现在也需要尝试学习AJAX了!一个或两个命令的大量学习。我最好开始了,你好,尼卡鲁斯。AJAX合适吗?W3S中的第一行指出“AJAX是关于更新web页面的一部分,而不重新加载整个页面”。但我需要两个动作才能转到另一页;与操作1最初进入的页面相同。这个应用程序还需要AJAX吗?