我们只做一件事,只为您满意--山东微道商网络技术有限公司
当前位置:主页 -> 新闻中心 > 公司新闻 >

如何在网站开发中使用好Form表单?

来源:http://www.jnzyjz.cn/ 发布时间:2021-06-07

网站开发Form表单提交:是整个页面进行跳转到服务器后提交数据 有get,这个是前端一个查询功能使用到的
Website development form form submission: it is the whole page to jump to the server to submit data. There is get, which is used by a front-end query function
表单
form 
跳转地址提交的方式
How to submit jump address
这种提交只需要在php文件中按你所使用的php框架获取参数的方法就可以获取到Form提交过来的参数,如下图:
This submission only needs to get the parameters in the PHP file according to the PHP framework you use to get the parameters submitted by the form, as shown in the following figure:
函数
function
我这里使用的框架是php3.2的框架,所以直接使用内置的就可以直接获取到提交的参数,拿到之后就是可以拿去做你需要的查询,或者保存到数据库。
The framework I use here is php3.2 framework, so you can directly get the submitted parameters by using the built-in framework, and then you can do the query you need or save it to the database.
还有就是jq提交:
There is also JQ submission:
其实原理基本一致,主要就是通过获取Form表单里的产数集合  可以自己一个一个数据的获取 然后对数据进行验证得到符合条件的 。
In fact, the principle is basically the same, mainly by obtaining the production number set in the form & nbsp; You can get the data one by one, and then verify the data to get the qualified data.
如图就是使用js提交的
As shown in the figure is submitted using JS
济南网站建设
表单提交
Form submission
像这种就是前端经常使用的下拉框筛选使用到的提交
This is the drop-down box that is often used by the front end to filter the submission
下面是jq代码:
Here is the JQ Code:
代码
code
原理其实是一样的,都是把需要的数据提交到后端页面去处理,处理完了改返回就返回,不需要返回前端就给用户一个提示就完事了。
In fact, the principle is the same. They all submit the required data to the back-end page for processing. After processing, they will return when they change to the back-end page. They don't need to return to the front-end page to give the user a prompt.
后台也有很多需要使用到Form表单的地方,比如:新闻,产品等,主要还是前端需要展示的数据,都需要现在后台进行填写提交保存到数据中,这样就方便前端数据展示,这些地方都需要使用到Form表单来把数据提交,然后处理保存。
There are many places in the background that need to use the form, such as news, products, etc. the main data that need to be displayed in the front end need to be filled in, submitted and saved in the data in the background, so as to facilitate the front-end data display. These places need to use the form to submit the data, and then process and save it.
本文来自:济南网站开发更多的内容请点击:http://www.jnzyjz.cn 我们将会为您提问的问题提供一个满意的服务,欢迎您的来电!
This article is from: Jinan website development. For more content, please click: http://www.jnzyjz.cn  We will provide a satisfactory service for your questions, welcome your call!
相关文章
相关推荐