Bootstrap Tutorial - Add search icon to button








The following code shows how to add search icon to button.

Example

<!--from   w w w . j ava2  s  .  com-->
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.9.1.js'></script>
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css">
<script type='text/javascript'
  src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
</head>
<body style='margin:30px'>
  <div class="input-append">
    <input class="span1" id="appendedInputButton" type="text" />
    <button type="submit" class="btn">
      <i class="icon-search"></i>
    </button>
  </div>
</body>
</html>

Click to view the demo