Hey all,
I have a .js file that contains quotes but can't get it to work...and is basically as follows
quotes = new Array();
quotes[0] = "quote one";
quotes[1] = "quote two.";
index = Math.floor(Math.random() * quotes.length);
document.write("<DL>\n");
document.write("<DT>" + "\"" + quotes[index] + "\"\n");
document.write("</Dl>\n");
My link in the body text is
<script language="javascript" src="http://www.murphyz.co.uk/js/quote.js"></script>
is there anything that should go in the <head> section?
Also what would happen if I wanted the quote to have speech and needed quotation marks? i.e
quotes[0] = "she said "does this work okay?"";
Thanks
Mxx
I have a .js file that contains quotes but can't get it to work...and is basically as follows
quotes = new Array();
quotes[0] = "quote one";
quotes[1] = "quote two.";
index = Math.floor(Math.random() * quotes.length);
document.write("<DL>\n");
document.write("<DT>" + "\"" + quotes[index] + "\"\n");
document.write("</Dl>\n");
My link in the body text is
<script language="javascript" src="http://www.murphyz.co.uk/js/quote.js"></script>
is there anything that should go in the <head> section?
Also what would happen if I wanted the quote to have speech and needed quotation marks? i.e
quotes[0] = "she said "does this work okay?"";
Thanks
Mxx
Comment