javascript将表单从一个页面复制到另一个页面上的另一个表单
是否可以使用javascript将第x页上的表单中的值复制到第y页上的表单。数据是相同的,但只是不同的页面和不同的应用程序?
Is it possible to copy values from a form on page x to a form on page y using javascript. The data is the same but just different pages and different applications?
是的,你可以这样做。使用AngularJS,您可以使用搜索变量,然后将这些变量插入表单中。使用普通的javascript,您可以使用#与数据。使用PHP +普通javascript(更安全)你可以发送一个POST到页面(这是一个PHP页面)并有页面,如果你的值存在POST params,在页面上放置一个javascript片段设置值的页面加载后形成。
Yes, you can do this. Using AngularJS you could use "search" variables and then plug these into the form. Using normal javascript you may be able to use a # with the data. Using PHP + normal javascript (more secure) you can send a POST to the page (which is a PHP page) and have the page, if the POST params with your values exist, put a javascript fragment on the page setting the values of the form when the page is done loading.
Cookie也始终是一个选项:)
Cookies are also always an option :)
经过讨论,以下是问题的解决方案: GitHub
After discussion, here is the solution to the question: GitHub