Use js to transfer data from one page to the layer of another page?
If it is transferred to a new page, directly use get or post to obtain the language in which your website is developed, and then output it to this layer
Transfer parameters via url
If it is an HTML page, the JS passed to the new page will be window.location.href='a.html?id=100'; and then the JS of the a.html page will be
<script> document.getElementById("s").innerHTML=window.location.split('?')[1]; </script>
If you want to implement AJAX to transfer parameters from page a to page b and display the results of executing parameters of page b on the layer of page a, then use AJAX
This is too much to write, so I’ll give you JQUERY
<div id="a"></div> $("#a").load("b.html?id=100"); //或者 $.get("b.html?id=100",function(data){ $("#a").html(data); })
There are also POST methods, so I won’t list them all here