jsp页面跳转

window.location.href还有window.open()。后者是打开新的页面。

当提交表单采用ajax提交时,若使用<input type="submit"> window.location.href可能不管用。<a href=”javascript:函数名()”> 就可以正常跳转。

   location.replace("xx.html");

   location.href

   参数截取:

    var url = location.href;
    var para=url.substring(url.indexOf('?') + 1, url.length);
    var newsId=para.substring(para.indexOf('=')+1,para.length);   

          <div id="content-container">
                 <br>
                  <br>
                  <h3><div id="title"></div></h3>
                  <br>
                  <br>
            </div>

                 $("#title").html(title);
                $("#content-container").append(content);

原文地址:https://www.cnblogs.com/dobestself-994395/p/4348305.html