weixin_33717298 2017-07-21 08:47 采纳率: 0%
浏览 17

如何将jQuery代码转换为Ajax?

能将下面的jQuery代码转换为Ajax吗?

<script type="text/javascript">
    $j(document).ready(function () {
        $j("#co-shipping-method-form .buttons-set button.button").click(function () {
            var shippingSelectedValue = $j("input[name='shipping_method']:checked").val();
            if(shippingSelectedValue == 'freeshipping_freeshipping' ){
           $j("#customtest_modal_id").show();
            }
        });
        $j("a.reset-customtest").click(function () {
            $j("#customtest_modal_id, #checkout-step-shipping_method").show();
            $j("#checkout-step-payment").hide();
        });

    });

</script>
  • 写回答

2条回答 默认 最新

  • weixin_33681778 2017-07-21 08:57
    关注

    I think you misunderstand concept of AJAX.

    Here are things AJAX can do for you: - Read data from a web server - after the page has loaded - Update a web page without reloading the page - Send data to a web server - in the background

    In short, AJAX is a way to transport data via XML

    评论

报告相同问题?

悬赏问题

  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型
  • ¥15 求学软件的前人们指明方向🥺
  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题