How to write an URL link by java script?

Discussion in 'JavaScript' started by JJnacy, Jun 3, 2009.

  1. #1
    usually we write URL links as these

    <a href="http : // URL">a link</a>

    <a href="http : // URL/?rd=random">a link</a>

    My question is:
    Can we write it via java?
    Please show java script.


    Thanks/ Regards
     
    JJnacy, Jun 3, 2009 IP
  2. James Barcellano

    James Barcellano Active Member

    Messages:
    114
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #2
    <span onclick='window.location = "http://www.google.com/"'>LINK</span>
    
    HTML:
    Like that?
     
    James Barcellano, Jun 3, 2009 IP
    JJnacy likes this.
  3. JJnacy

    JJnacy Peon

    Messages:
    448
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you,

    Can someone add a java random number as a query to avoid the old cache to appear again?

    Regards,
     
    JJnacy, Jun 3, 2009 IP
  4. Unni krishnan

    Unni krishnan Peon

    Messages:
    237
    Likes Received:
    9
    Best Answers:
    2
    Trophy Points:
    0
    #4
    Hope this helps.

    or

     
    Unni krishnan, Jun 4, 2009 IP
  5. JJnacy

    JJnacy Peon

    Messages:
    448
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    All thanks very much for all the helps.
     
    JJnacy, Jun 4, 2009 IP