JQuery AJAX无法找到URL / Pass数据

时间:2016-02-14 20:16:36

标签: php jquery ajax

我有一个ajax脚本将用户名和密码值传递给服务器脚本(php)进行表单验证,它在本地托管时工作正常,但是当我最近在线移动时,似乎ajax无法找到url并返回[对象] [对象]。

jquery代码:

            $wp_customize->add_setting(
              'slideshow-homepage',
              array(
                'default' => 'none',
               )
              );

            $wp_customize->add_control(
              'slideshow-homepage',
              array(
                'type' => 'select',
                'priority' => 3,
                'label' => 'Slideshow',
                'description' => '',
                'section' => 'homepage',
                'choices' => array(

                'somehow' => 'somehow',
                'list' => 'list',
                'all' => 'all',
                'custom' => 'custom',
                'post' => 'post',
                'types' => 'types',
                'of' => 'of',
                'type' => 'type',
                'slideshow' => 'slideshow'

                ),
              )
            );

另外,我的服务器端语句检索帖子值:

$.ajax
({
    type: 'POST',
    url: '/sitename/s_logincheck.php',
    data: {UserName:UID, Password:PWD},
    cache: false,
    error: function(data) { alert(data); }
    success: function(data) { if(data==0) { //redirect to home page }}
});

请告知。

0 个答案:

没有答案
相关问题