網(wǎng)站開發(fā)Form表單提交:是整個(gè)頁(yè)面進(jìn)行跳轉(zhuǎn)到服務(wù)器后提交數(shù)據(jù) 有g(shù)et,這個(gè)是前端一個(gè)查詢功能使用到的
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
跳轉(zhuǎn)地址提交的方式
How to submit jump address
這種提交只需要在php文件中按你所使用的php框架獲取參數(shù)的方法就可以獲取到Form提交過來的參數(shù),如下圖:
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:
函數(shù)
function
我這里使用的框架是php3.2的框架,所以直接使用內(nèi)置的就可以直接獲取到提交的參數(shù),拿到之后就是可以拿去做你需要的查詢,或者保存到數(shù)據(jù)庫(kù)。
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:
其實(shí)原理基本一致,主要就是通過獲取Form表單里的產(chǎn)數(shù)集合 可以自己一個(gè)一個(gè)數(shù)據(jù)的獲取 然后對(duì)數(shù)據(jù)進(jìn)行驗(yàn)證得到符合條件的 。
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
像這種就是前端經(jīng)常使用的下拉框篩選使用到的提交
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
原理其實(shí)是一樣的,都是把需要的數(shù)據(jù)提交到后端頁(yè)面去處理,處理完了改返回就返回,不需要返回前端就給用戶一個(gè)提示就完事了。
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.
后臺(tái)也有很多需要使用到Form表單的地方,比如:新聞,產(chǎn)品等,主要還是前端需要展示的數(shù)據(jù),都需要現(xiàn)在后臺(tái)進(jìn)行填寫提交保存到數(shù)據(jù)中,這樣就方便前端數(shù)據(jù)展示,這些地方都需要使用到Form表單來把數(shù)據(jù)提交,然后處理保存。
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.
This article is from: Jinan website development. For more content, please click: http://www.sun2007.cn We will provide a satisfactory service for your questions, welcome your call!