Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/467.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jquery mobile在使用ajax提交表单后隐藏主要内容_Javascript_Jquery_Ajax_Mobile - Fatal编程技术网

Javascript jquery mobile在使用ajax提交表单后隐藏主要内容

Javascript jquery mobile在使用ajax提交表单后隐藏主要内容,javascript,jquery,ajax,mobile,Javascript,Jquery,Ajax,Mobile,当我用ajax提交表单时,一切似乎都正常,但内容是隐藏的。我只能在inspect元素上看到它,但不能在浏览器中看到它 有什么建议吗 这是我正在使用的代码。我已经试过了。trigercreate $("#submit").click(function(){ var formData = $("#post").serialize(); $.ajax({ type: "POST", ur

当我用ajax提交表单时,一切似乎都正常,但内容是隐藏的。我只能在inspect元素上看到它,但不能在浏览器中看到它

有什么建议吗

这是我正在使用的代码。我已经试过了。trigercreate

$("#submit").click(function(){

            var formData = $("#post").serialize();

            $.ajax({
                type: "POST",
                url: "ajax.php",
                cache: false,
                data: formData,
                success: function (data) {
                       $('#allfeeds').append().html(data);
                       $("#content ul").listview('refresh');                           

                    }
             });               
            });
提前感谢您的帮助

更新。谢谢你的帮助。我使用了append方法,它正在工作

使用append或html插入数据,但这两种方法都用错了

 $('#allfeeds').html(data);


使用$'allfeeds'.htmldata;如果它是相同的数据,那么最终会得到相同数据的多个副本-重复数据。因此,请确保使用$'allfeeds'.empty.htmldata或$'allfeeds'.empty.appenddata
 $('#allfeeds').append(data);