Friday, 1 May 2015

how to make or remove underline in css/html


CSS:

<style>
             text-decoration:none;   //remove underline
             text-decoration:underline;   //make underline
</style>

Eg:
      a:hover {
         text-decoration: underline;
      }

      a:active {
         text-decoration: underline;
      }
     a:hover {
         text-decoration: none;
      }

      a:active {
         text-decoration: none;
      }

Wednesday, 29 April 2015

Enter to onsubmit in html or catching Enter key?

Here is the solution, you are looking for

HTML CODE:

<form id="myform" onsubmit="return myFunction()">
          <input type="text" id="textbox">
          <input type="submit" id="mysubmitid" value="Go">

</form>


JAVA SCRIPT:

$(document).ready(function()
{
    $('#textbox').keypress(function(ev)
    {
            //If user pressed Enter Key then trigger Submit click
            if(ev.keyCode==13)
            $('#mysubmitid').click();
            });
});