View Full Version : Acceptable practise
Is it acceptable to put a value in an IMG tag to be referenced by a function
<img onclick="myclick(this.id,'mydiv')" src="pic.gif" id="mypic" value="52">
02-09-2004, 09:15 PM
Just make sure you customize the DTD to keep the code valid.
However since you use the explicit onclick call why not make it part of the function arguments:
<img onclick="myclick(this.id,'mydiv',52)" src="pic.gif" id="mypic">
Never thought of that
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.