Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1000 Once an image has loaded how can I display its width and height beneath the image?

You are here: irt.org | FAQ | DHTML | Q1000 [ previous next ]

Try:

<script language="JavaScript"><!--
function update(what) {
    document.myForm.width.value = what.width;
    document.myForm.height.value = what.height;
}
//--></script>

<img src="image.gif" onLoad="update(this)">

<form name="myForm">
<input type="text" name="width">
<input type="text" name="height">
</form>

Feedback on 'Q1000 Once an image has loaded how can I display its width and height beneath the image?'

©2018 Martin Webb