How to use HTML forms without a server

后端 未结 6 541
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-14 08:49

I am not a web-developer and want to understand the better way to pass variables. In the past I have used various ways to pass things to java script functions. I have never

6条回答
  •  滥情空心
    2021-01-14 08:59

    You don't need servers / databases to use forms. Forms are simply a method from passing variables from one file to another, regardless if that is an html file or some php script or what have you. If you stick to using GET forms, your form will naturally pack its data into the URL of your page at which time you can access them. For instance (borrowed from http://www.onlineaspect.com/2009/06/10/reading-get-variables-with-javascript/):

    
    

提交回复
热议问题