Detailed parameter pass four kinds of form _ basic knowledge

Source: Internet
Author: User

This article is summed up in the day-to-day work, the following four kinds of parameters to convey the form of the show to everyone.

When to use GET, check, delete,

When to use post, add, change (Special column: Login with post, because the user name and password can not be displayed on the URL)

4 kinds of Get-pass mode

 
 


<!--//parameter transfer in several forms-->

<!--First: Add parameters directly behind the URL:-->

Copy Code code as follows:

Localhost:21811/handler1.ashx?id=1&name= "ABC"

<!--the second: passing parameters in a hyperlink: When you click the hyperlink, you jump to the Localhost:21811/handler1.ashx page first, and then pass the ID and name two parameters past-->

<a href= "localhost:21811/handler1.ashx?id=1&name= ' abc" > hyperlink pass Parameters </a></body>
<!--third: Through the JS method pass: The user clicks on this button, triggers the onclick event, executes the Go () method, jumps to localhost:21811/ Handler1.ashx the page, passing the ID, and name two parameters past-->
<input type= "button" onclick= "Go ()" value= "passing parameters via JS method"/>
<!--Fourth: passing--> with form forms

 <form action= "Handler1.ashx" method= "get" ><!--Note that the connection within the action cannot have a parameter-->> <input type= 
  "text" Name= "id" value= "3"/> 
  <input type= "text" name= "name" value= "abc"/> <input type= 
  "Submit" value= " By passing parameters "/> 
 </form> 
</body> 

Through the introduction of the above code, I believe everyone will like.

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.