如何将一个HTML页面传递并获取到另一个HTML页面...? [英] How to pass and get values one HTML page to another HTML page...?

查看:217
本文介绍了如何将一个HTML页面传递并获取到另一个HTML页面...?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将一个HTML页面的值传递给另一个HTML页面...我正在尝试查询字符串,但不安全。如何保护..?



我尝试了什么:



我正在尝试查询字符串...但不安全.... plz help

解决方案

你必须POST而不是得到你需要做某种形式的表单提交,也许通过javascript(谷歌提交表单javascript),你可以把数据你想传递给隐藏字段中的其他html页面(谷歌更新隐藏字段javascript)。



请注意,它仍然不是安全,但是数据更难操作,因为它不在网址上,但如果有人知道他们在做什么,它仍然可以被操纵。实际上没有任何方法可以正确保护这样的传输,您使用的协议不是安全协议。


除了上述答案,

你应该使用客户存储 [ ^ ]将数据存储在浏览器窗口中并用于获取/设置数据跨越不同的页面。但是,如果用户足够智能从浏览器挖掘值,则它是不安全的。



参考这些

使用Cookies从一个页面向另一个页面发送(传递)数据(值)[ ^ ]

9个用于使用本地存储的JavaScript库 [< a href =https://www.sitepoint.com/9-javascript-libraries-working-with-local-storage/target =_ blanktitle =New Window> ^ ]

您可以使用表单发布方法,如果您不想显示信息,请使用隐藏字段。在表单的操作属性中输入目标页面名称。


How to pass and get values one HTML page to Another HTML page...I m trying Query string,but not secured., how to secure..?

What I have tried:

I m trying Query string...but not secured....plz help

解决方案

You have to POST rather than get so you need to do a form submission of some kind, maybe via javascript (google "submit form javascript") and you can put the data you want to pass to the other html page in hidden fields (google "update hidden field javascript").

Note that it still isn't "secure", however the data is harder to manipulate as it isn't on the url, but it can still be manipulated if someone knows what they are doing. There really isn't any way to properly secure transmissions like this, the protocols you are using are not secure protocols.


In addition to the above answers,
you shall use client storage[^] to store the data in the browser window and use it to Get/Set data across different pages. however its is not safe if the user is smart enough to dig the values from browser.

refer these
Send (Pass) Data (Values) from one page to another using Cookies [^]
9 JavaScript Libraries for Working with Local Storage[^]


You can use form post method and if you do not want to display info use hidden field .Put destination page name in form's action attribute.


这篇关于如何将一个HTML页面传递并获取到另一个HTML页面...?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆