簡體   English   中英

誰能解釋一下這段代碼?

[英]can someone explain this bit of code?

誰能解釋一下這段代碼?

<script type="text/javascript"><!--

    $('#button-confirm').bind('click', function() {
        $.ajax({ 
            type: 'get',
            url: 'index.php?route=hybrid_directory/confirm',
                success: function() {
                    location = '<?php echo $continue; ?>';
            }
        });
    });

    function formSubmit()
    {
        document.getElementById("freecontactform").submit();
    }

//--></script>

按鈕確認,當點擊從php聯系表單提交信息時。 如何使用網址和功能 - 使用位置?

這是一個ajax調用,當單擊id為“button-confirm”的元素時觸發。

當ajax調用完成后,url將重定位到加載此頁面定義為$continue的PHP腳本

這是jquery ajax方法的文檔: http//api.jquery.com/jQuery.ajax/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM