用js通过url传参把数据从一个页面传到另一个页面

网络编程 发布日期:2025/11/18 浏览次数:1

正在浏览:用js通过url传参把数据从一个页面传到另一个页面

用js把数据从一个页面传到另一个页面的层里"s"></div>

<script>
document.getElementById("s").innerHTML=window.location.split('"htmlcode">
<div id="a"></div>
$("#a").load("b.html");
//或者
$.get("b.html",function(data){
$("#a").html(data);
})

还有POST方法,这里就不一一罗列了