inactive html link

Discussion in 'HTML & Website Design' started by bumbarov, Jan 3, 2012.

  1. #1
    Hello!
    Can you make the link inactive.
    By clicking the link with javascript to get only id and data value.

    <a href="?id=2&data=val"> sdsad </ a>

    I do not want to follow the link. I just want to get data

    thank you
     
    bumbarov, Jan 3, 2012 IP
  2. Inna

    Inna Peon

    Messages:
    16
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    0
    #2
    "return false" stops a browser action like opening link or form submit
    example: <a href="http://google.com/" onclick="functionName(); return false;">Click me</a>
     
    Inna, Jan 3, 2012 IP