Obtain header and rest of paragraphs from a text file
Is there a way of doing this with java script?
I have a homepage, that has to go to a certain directory, find the newer TXT file, get the first paragraph, get it formated with H1 tag, then read the rest format it with a P tag.
So everytime a new TXT file is created in that directory the homepage (HTML/index.html) change.
Thank in advance
Re: Obtain header and rest of paragraphs from a text file
write the js screipt:
1) read the text file into a stream of text ( i mean line by line)
spcify to which line you want the text to be
2) uuse 2 variables and assgn the text to the h1 and p
then use document.write() method to write it into the html poage
ATTACH the js to the html page
(rem to put the read fuction to the winod.onlad thng)
|All times are GMT +5.5. The time now is 05:56.|