text formatting in random javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pete from Boston

    #1

    text formatting in random javascript

    I'm going through some "learning by doing" of javascript through trial
    and error, and admittedly have a lot to learn. But in taking various
    scripts and dissecting them, I still can't figure out if what I want to
    do is possible, and that is this:

    I'm trying to include a paragraph on my page that is randomly chosen
    each time the page loads. This I can do. But in this paragraph I'm
    trying to include varied text formatting (parts bold, parts different
    color, etc), and make part of it a link.

    If I use unformatted, un-linked text, it works fine, but that's not my
    goal. When I try including html in the items from which to be selected
    randomly, whether by directly specifying the attributes or using CSS
    class references, nothing displays, which makes me wonder what of all
    this is the problem.

    Any tips? Any scripts I should look at that do this successfully?

  • bne

    #2
    Re: text formatting in random javascript

    Do you have any code you could show us?

    Comment

    Working...