Avatar of Mark Steggles
Mark Steggles
Flag for United States of America

asked on 

Javascript event listeners


I made a little script to show and hide tips when focusing and blurring certain fields, currently I'm doing inline events to call the functions:

            <input type="text" name="zipCode" onFocus="showTip(this.name)" onBlur="hideTip(this.name)" />

is it possible to make this cleaner so that I dont have to have the onFocus and onBlur in the tags? Only some of the inputs call the function though.


Avatar of undefined
Last Comment
Mark Steggles

8/22/2022 - Mon