Javascript in HTML help
4 posts
Page 1 of 1
ok so i just started to learn javascript and im trying to set my inputs value property onmouseover
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
Code: Select all
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 <input id="Input" type="Text" border="3" maxlength="2" value="Min" onmousemove="Input.text='';">
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
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=''"
this should be...
Code: Select all
onMouseOver="this.value='';"
JavaScript doesn't tend to be very strict about the line specifier.
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023