text formatting in random javascript

P

Pete from Boston

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top