JavaScript border-color/color styling

Posted by Dan on Stack Overflow See other posts from Stack Overflow or by Dan
Published on 2010-04-12T02:10:04Z Indexed on 2010/04/12 2:13 UTC
Read the original article Hit count: 487

Filed under:
|
|
|

Hi! I'd like to style 'input.submit' of a form (hover effect for IE) using JS and tried the following which doesn't work unfortunately.

<!--[if IE]>
<script type="text/javascript">

// CHANGE SUBMIT STYLE
var foo = document.getElementByClass('input.submit');
foo.onmouseover = this.style.border-color='#000000'; this.style.color='#000000';
foo.onmouseout = this.style.border-color='#888888'; this.style.color='#888888';
foo.onclick = this.style.border-color='#000000'; this.style.color='#000000';

</script>
<![endif]-->

Could you please fix this for me? TIA, Dan

© Stack Overflow or respective owner

Related posts about border-color

Related posts about color