我想将下面的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>
你是什么意思与“转换”?你知道Ajax用于什么吗? – hallleron
Ajax是一种调用后端函数以返回日期的方法。你的代码只是一个绑定点击事件..... – Ciccio
@hallleron:我不知道ajax那么多:我需要的是我有一个按钮单击我想执行上述逻辑可以让我知道如何实现这个 – magento12345