Lets consider that I have a text file named text.txt. So, now I made a file named showtext.html in which I have to write javascript such that it can display the text present in text.txt. I assume it would be like :
Text ( text.txt )
Show me up ! HTML ( showtext.html )
<!DOCTYPE html> <html> <body> <script> var src = "text.txt"; document.write( value.get( src ) ); </body> </html> Output of showtext.html
Show me up ! In, the above function the value.get() gets and then writes the value of the text.txt. So, can javascript really do such ? How can I make the value.get() ? Will it support only .txt extension or can support any custom extension ? Or this can only be done with PHP ?