Changing the color of div on "enter click"?
Posted: Mon Oct 04, 2010 5:38 am
Hi,
I am a javascript newbie and wonders how to do this:
I want to change this:
to this
when enter is clicked when the form field is focued (to make it behave like a button).
Anyone knows how to do this?
This is the code for the button BTW:
I am a javascript newbie and wonders how to do this:
I want to change this:
Code: Select all
.buttons a, .buttons button{
background-color:#f5f5f5;Code: Select all
.buttons a, .buttons button{
background-color:#000000;Anyone knows how to do this?
This is the code for the button BTW:
Code: Select all
<div class="buttons">
<a href="#" onclick="this.blur();parent.document.forms[0].submit();">
Search
</a>
</div>
</form>