gpt4 book ai didi

javascript - 单击无需重新加载页面

转载 作者:行者123 更新时间:2023-12-02 04:18:36 25 4
gpt4 key购买 nike

我有 2 个这样的网址:

    <td><a href='infomation/gc_details_2.php?id=<?php echo $row['trans_id']?>'><input type='button' id="yes"  value='Yes'></a></td>
<td><a href='infomation/del_notifi_2.php?id=<?php echo $row['trans_id']?>'><input type='button' value='No'></a></td>

当单击按钮时,它会请求gc_details_2.php并重新加载包含搜索结果的所有页面。现在我想当单击按钮"is"时无需重新加载页面。我应该怎么做?谢谢大家

最佳答案

这是最简单的$('#yes').click(function(){
$.get('gc_details_2.php', 函数(数据) {
$('html').html(数据);
});
返回假;
});
而且它始终有效

关于javascript - 单击无需重新加载页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31956174/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com