You are here: irt.org | FAQ | JavaScript | Window | Q1706 [ previous next ]
Try:
<script language="JavaScript"><!-- function openRandom(i) { window.open(i + '.htm','windowName'); } //--></script> <form> <input type="button" value="Open" onClick="openRandom(Math.floor(Math.random() * 100) + 1)"> </form>