跨页传值时出现问题,原因是本地file:///路径开头的文件传值发生错误。
原代码为:
function open_win()
{
window.open("file:///C:/Users/Administrator/Documents/project2018010-table.html","","width=400,height=400")
}
更改为:
function open1(){
window.open("project2018010-table.html","","width=400,height=200")
}
本来是用Editplus直接打开html文件,出现问题后借鉴了https://blog.csdn.net/xqhys/article/details/68483365的经验,转而在Myeclipse中搭建项目,在Tomcat上重新运行,错误消失,跨页传值才得以实现。