Button Link Universe big diversion

Source: Internet
Author: User
Tags id3 variables reset variable
button | link | button | Links as a small tip, temporarily categorized into ASP.

When designing a Web site, we might want to make the link look like a button. Let me tell you my method.
1, the button made the link (picture) appearance
Submit button <input type= "Submit" value= "submitted" >
Submit link <a href= "#" onclick= "form name. Submit ()" > Submit </a>

Reset button <input type= "reset" value= "reset" >
Reset link <a href= "#" onclick= "form name. Reset ()" > Reset </a>

Normal button <input type= "button" value= "buttons" onclick= "function ()" >
Normal link <a href= "#" onclick= "function ()" > Links </a>

As for the picture, replace a label with IMG.

2, link to make the appearance of the button
<a href= "reg.asp" > Registration </a>
=><input type= "button" value= "registered" onclick= "location.href= ' reg.asp '" >

-----------------------------------
Sometimes we can do a get form manually, as with buttons or links.
<form action= "xx.asp" method= "Get" Name= "Form1" >
<input name= "AA" type= "text" id= "AA" >
<input name= "BB" type= "text" id= "BB" >
<input type= "Submit" name= "Submission" value= "submitted" >
</form>
=>
<input name= "AA" type= "text" id= "AA" >
<input name= "BB" type= "text" id= "BB" >
<input type= "button" value= buttons "onclick=" location.href= ' xx.asp?aa= ' +document.all[' AA '].value+ ' &bb= ' + document.all[' BB '].value >
-----------------------------------
Further said that we can also do a button (link) to pass the JS variable, form input value, ASP variables, recordset value
<script language= "JavaScript" >
var id1=1;
</script>
<%
Id3=3
....
Rs.Open exec,conn,1,1
Suppose to have RS ("Id4") =4
...
%>
<input name= "Id2" type= "text" id= "Id2" value= "2" >
<input type= "button" value= "buttons"
onclick= "location.href= ' xx.asp?id1= ' +id1+ ' &id2= ' +document.all[' id2 '].value+ ' &id3=<%=id3%>& Id4=<%=rs ("Id4")%> ' ">
We press the button to see the browser URL is xx.asp?id1=1&id2=2&id3=3&id4=4
In the xx.asp we can use Request.QueryString to get all the variables, so is not the disguise of the client JS and server segment of the variable delivery?



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.