Passing parameter in Hyperlink

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abhishekbrave
    New Member
    • Dec 2007
    • 79

    Passing parameter in Hyperlink

    Hi
    Can we pass a value through hyperlink.
    My requirement is that suppose i have 3 hyperlinks 1 2 3
    When I click on 1 or 2 or 3 another HTML page will get open having the information that "1 is clicked" if I click 1.
  • rnd me
    Recognized Expert Contributor
    • Jun 2007
    • 427

    #2
    <a href="thepage.h tm?click=1"> pass 1</a>

    <a href="thepage.h tm?click=2"> pass 2</a>

    <a href="thepage.h tm?click=3"> pass 3</a>

    on thepage.htm :
    Code:
    //assuming you only need to pass the one piece of info:
    <script>
    alert(location.toString().split("=")[1])
    
    <script>

    Comment

    Working...