Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<style>
  * { padding: 0; margin: 0; }
  ol {
    list-style: none;
  }
  li {
    margin: 5px 0;
  }
  
  label {
    float: left;
    width: 100px;
  }
</style>
</head>
<body>
  <form>
    <ol id="ar">
      <li>
        <label>Name:</label>
        <input type="text" name="name">
      </li>
      <li>
        <label>Email:</label>
        <input type="text" name="email" class="disabled1">
      </li>
      <li>
        <label>Other field:</label>
        <input type="text" name="other" value="Your value" class="disabled1" >
      </li>
      <li>
        <button id="aa" type="button" >Submit</button>
      </li>
    </ol>
    <button id="ccc" type="button" >eeee</button>
  </form>
</body>
</html>
 
$(function() {
  $('input.disabled1').attr('disabled',false);
  
});
$("#aa").click(function(){
  $('input.disabled1').attr('disabled',true);
  });
$("#ccc").click(function(){
  $("#ar").attr('disabled',true);
  });
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers