How to apply onfocus function to all “input” objects?

Gemil

New Member
I'd like to create an onfocus function to my input fields in a form. I'm working with a drag and drop landing page wizard(in Marketo) therefore I don't have access to the HTML tags.I tried to do use getElementById and it worked only on the first field. I also tried the following:\[code\]<script>var input = document.getElementsByTagName('input')[0]input.onfocus = function() { this.value=''}</script>\[/code\]
 
Back
Top