Results 1 to 2 of 2

Thread: DHTML OnMouseOver Question

  1. #1
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default DHTML OnMouseOver Question

    Ok, I'm adding a mouseover to a submit button for a form.
    I'm using this:

    Code:
    onmouseover="style.background='#003399'"
    now, what if I wanted to add a color='white' as well?

    I've tried a lot of different ways to add another thing on the end of that.

    Code:
    onmouseover="style.background='#003399'.color='white'"
    Code:
    onmouseover="style.background='#003399'&&color='white'"
    etc, etc, etc

    anyone have any idea how to do this?

    for firefox, I just use the css :hover property on the input. However, for IE...I have to resort to less cosher methods, such as the onmouseover.
    Thanks.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    onmouseover="this.style.backgroundColor='#003399';this.style.color='white';"
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •