📜  ajax 也调用 functions.php - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:35.042000             🧑  作者: Mango

代码示例1
var ajaxurl = 'https://example.com/wp-admin/admin-ajax.php';
    $.ajax({
        url: ajaxurl,
        type: 'post',
        data: { action: 'register_user' ,"username": "arshia"},
        success: function(response) { console.log(response); }
    });