Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap

Q1510 How can I make the width of an image the same as the width of the visitor's window?

You are here: irt.org | FAQ | JavaScript | Image | Q1510 [ previous next ]


<script language="JavaScript"><!--
if (document.all) w = document.body.clientWidth;
else if (document.layers) w = window.innerWidth;
else w = 640;
document.write('<img src="stretch.gif" width="' + w + '" height=200">');

©2018 Martin Webb