关键jsp页面跳转传递参数和接受参数


我的是在layui中跳转页面加传参:

type : 2,
                            title : "转换函数",
                            shadeClose : false,
                            area : [ '500px', '600px' ],
                            offset : '20px',//manag.jsp
                            content : [ _path + "return/ia/operator.do?type=1&id=" + treeNode.projectId, 'no' ],

到operator.jsp页面接受到type这个参数:

var type = "<%=request.getParameter("type")%>";

这样就获取到了传递过来的type,值为1;

 

 

通过 sessionStorage 进行jsp页面之间的传值

            从该页面传递时    sessionStorage.setItem('_ch',  JSON.stringify(_ch));
       在其他页面接收时 var _ch  =JSON.parse(sessionStorage.getItem('_ch'));

 

父子jsp关系之间

获取父页面:       var subcode =  parent.$("#devsName").val(); //获取到当前name(从device_properties页面而来)
               var devIds =  parent.$("#devsId").val();//获取到当前id(从device_properties页面而来)

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM