如何隐藏当前页面

Nui*_*nce 5 html javascript ajax jquery json

我与我的数据库有连接,我的数据库向我发送一些整数值,如“1”、“2”或类似的值。例如,如果我的数据库向我发送“3”,我显示第三页,它正在工作,但我的问题是当它显示第三页时,它不会隐藏我当前的页面。我认为我的代码在某个地方是错误的。请帮助我

<script>
            function show(shown, hidden) {
                console.log(shown,hidden)
                $("#"+shown).show();
                $("#"+hidden).hide();
            }

            $(".content-form").submit(function(){
                var intRowCount = $(this).data('introwcount');
                var exec = 'show("Page"+data.result,"Page' + intRowCount + '")';
                ajaxSubmit("/post.php", $(this).serialize(), "", exec,"json");
                return false;
            })


            function ajaxSubmit(urlx, datax, loadingAppendToDiv, resultEval, dataTypex, completeEval) {
                 if (typeof dataTypex == "undefined") {
                    dataTypex = "html";
                }

                request = $.ajax({
                    type: 'POST',
                    url: urlx,
                    dataType: dataTypex,

                    data: datax,
                    async: true,
                    beforeSend: function() {
                        $(".modalOverlay").show();
                    },
                    success: function(data, textStatus, jqXHR) {
                        //$("div#loader2").remove();
                        loadingAppendToDiv !== "" ? $(loadingAppendToDiv).html(data) : "";
                        if (typeof resultEval !== "undefined") {
                            eval(resultEval);
                        } else {
                            //do nothing.
                        }

                    },
                    error: function() {
                        alert('An error occurred. Data does not retrieve.');
                    },
                    complete: function() {
                        if (typeof completeEval !== "undefined") {
                            eval(completeEval);
                        } else {
                            //do nothing.
                        }
                        $(".modalOverlay").hide();
                    }

                });

            }
        </script>
Run Code Online (Sandbox Code Playgroud)

Nui*_*nce 1

感谢您帮助我的代码现在工作正常。问题是由于缓存而发生的。当我清除 Google Chrome 上的缓存和 cookie 时,它​​就修复了。