HTML (1) href and action,get post

Source: Internet
Author: User

1. the difference between href and Action

HREF can only get parameters,action can get parameters and can post Parameters

HREF is generally used for a single connection, can take parameters (URL rewrite), is requested by the Get method, in the address bar can see all the parameters;

Action is used for form submission (e.g. registration), and so on, he can submit a large number and more complex parameters, can be submitted by Post and get two ways. If you select post , the submitted information is not visible in the address bar. simple: Connect to an address alone, with an href; Submission and registration information, with Action

2. the difference between get and post

the get and post methods in the Form , respectively, correspond to the get in the HTTP Protocol during the data transfer. and POST methods. The main differences are as follows:

1,get is used to obtain data from the server, and Post is used to pass data to the server. 2

,Getfollow the data in the formVariable=valuethe form, added to theActionThe point ofURLback, and both use "?"Connect, and use between variables"&"Connection;Postis to put the data in the formformIn the data body, by the variable and value corresponding to the way, passed to theActionthe pointURL.  

3   get is unsafe because in the transfer process, the data is placed on the requested url url log files and   place them somewhere so that there may be some privacy information that is visible to third parties. In addition, users can see the submitted data directly in the browser, and some system internal messages will be displayed in front of the user.   All operations are not visible to the user.  

4 get url The length limit, while post You can transfer a lot of data, So you can only use post (There is a reason, of course, that will be mentioned later).  

5,Get limit The value of the data set of form form must be ASCII character, and Post support the entire ISO10646 character Set.  

6,Get is The default method for Form. the action 's quotes are filled with a path method, such as sending to a mailbox or other Web page

HTML (1) href and action,get post

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.