When doing page preview, the data is not stored in the database, but a page needs to be opened for preview. I asked the aunts and found out that this is how it is done.
1. Parent page
< input type="text" id="name" value="zhangsan"/>
Preview
2. The subpage, that is, a.html gets the value of the text box in the parent page
$(function(){
console.info(window.opener.document.getElementById("name").value);
});
In this way, what comes out in the console is the value of the text box on the parent page
Don't hurry say have no choice, perhaps, next intersection will meet hope.