I've been wondering lately: is it possible to create an array of some html tags (let's say array of <div> or array of <p>)? Something which would allow me adding a new <div> or <p> to the array.
I am to make a small html webpage in which there are supposed to be 2 text areas: in the first are certain words (for example tomorrow, money etc.), and in the second one there is an input text (let's say "Tomorrow you must send me the money I need"). Javascript should do this: print the input text in a paragraph/div, highlighting the words mentioned above. Something like: Tomorrow you must send me the money I need. This is how I thought of the array of tags, which can at any time add a new word to the output paragraph, it's only to be chosen whether to highlight it or not.
Is there a way to use array of tags? Or is there some other solution how to solve this task?
How to create an Array of divs?
Page 1 of 11 Replies - 942 Views - Last Post: 07 November 2011 - 11:56 AM
Replies To: How to create an Array of divs?
#2
Re: How to create an Array of divs?
Posted 07 November 2011 - 11:56 AM
I would just do a string replace of the text on the mentioned words.
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote



|