dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Want to change the text in div on every refresh of the page

  1. #1
    Join Date
    Dec 2012
    Posts
    6

    Want to change the text in div on every refresh of the page

    Hi All,

    I am creating website using Html and Css and want to show the section like "recent articles" with changing text on every refresh of the page. I am new to java script and i am unable to do it. Please help me.

  2. #2
    Join Date
    Dec 2012
    Posts
    6
    Also during search I found this link http://wsabstract.com/script/script2...tequotes.shtml

    But I don't know if it the the right way and how to show hyperlink in spite of text.

  3. #3
    Join Date
    Dec 2012
    Posts
    9
    This thread should give you the code you need, it's fairly simple to do... http://www.dynamicdrive.com/forums/s...m-quote-script

  4. #4
    Join Date
    Dec 2012
    Posts
    6
    Thanks for the link thewebtaylor. One more thing out of this script if I want to show different hyperlinks for every line (like different hyperlink text for quotes[0],quotes[1]....), please let me know how it's possible?

    var say = new Array();
    quotes[0] = " Welcome8";
    quotes[1] = " Hello8";
    quotes[2] = " Good to see you again8";
    quotes[3] = " What a pleasure it is to see you8";
    quotes[4] = " 7Having a good time, we hope.";

    var whichquote=Math.floor(Math.random()*(quotes.length))
    document.write(quotes[whichquote])

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles