Forum Moderators: open
All I want is something that says pick a number between 0 and 1. If it is 0 - document.write X, if it is 1 document.write Y.
Easy right? Yeah, not if you suck at JS. ;)
please help.
<!-- hide script
var rannum = Math.round(Math.random() * 1;
if (rannum <1 ) {
document.write('<a href="link.htm" target=\"_blank\">
<img src="ads/X.gif" border="0" vspace="10" alt="X"></a>');
}
else {
document.write('<a href="link2.htm" target=\"_blank\">
<img src="ads/Y.gif" border="0" vspace="10" alt="Y"></a>');
}
// end hiding -->
It's for an external file, if that makes any difference.
thank you.