Page 1 of 1

Javascript in HTML help

Posted: Sat Dec 03, 2011 1:41 am
by Bogoh67
ok so i just started to learn javascript and im trying to set my inputs value property onmouseover
Code: Select all
 <input id="Input" type="Text" border="3" maxlength="2" value="Min" onmousemove="Input.text='';">
is what i have so far, but im to used to VB and i know input.text obviously doesnt work, so how do i do it

also sorry if i posted it in the wrong section i didnt know if i should pt it in javascript or HTML so i decided HTML because i was basically programming most of it in HTML

Re: Javascript in HTML help

Posted: Sat Dec 03, 2011 1:56 am
by comathi
You've got almost all of it right, but here is the code you need to put for the onmousemove (although i suggest using onfocus if you are trying to click the textbox). Anyways, here it is:
Code: Select all
onmousemove="this.value=''"

Re: Javascript in HTML help

Posted: Wed Dec 07, 2011 2:12 am
by Scottie1972
this should be...
Code: Select all
onMouseOver="this.value='';"

Re: Javascript in HTML help

Posted: Thu Dec 08, 2011 8:30 pm
by mandai
JavaScript doesn't tend to be very strict about the line specifier.