Javascript in HTML help

4 posts Page 1 of 1
Contributors
User avatar
Bogoh67
VIP - Site Partner
VIP - Site Partner
Posts: 656
Joined: Sun Apr 18, 2010 8:20 pm

Javascript in HTML help
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
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: Javascript in HTML help
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=''"
User avatar
Scottie1972
Codenstuff Elite
Codenstuff Elite
Posts: 953
Joined: Thu Jan 14, 2010 5:48 am

Re: Javascript in HTML help
Scottie1972
this should be...
Code: Select all
onMouseOver="this.value='';"
Image
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Javascript in HTML help
mandai
JavaScript doesn't tend to be very strict about the line specifier.
4 posts Page 1 of 1
Return to “Help & Support”