Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
  article, aside, figure, footer, header, hgroup, 
  menu, nav, section { display: block; }
  
  [readonly] { opacity:0.5; }
</style>
</head>
<body>
  <input id="foo" type="button" value="mybutton" disabled>
  
  <input id="ok" type="button" value="Disable">
  <input id="nok" type="button" value="Enable">
                              <label><input type="radio" name="invoiceType" value="2" onClick=""/>123</label>
                              <label><input type="radio" name="invoiceType" value="3" onClick=""  />456</label>
  <div contenteditable="true" disabled>
    dd
    
  </div>
  <select><option>xxxx</option><option class="a">xxxx1</option>
  </select>
  <td id="aaaaa">test</td>
</body>
</html>
 
$("#ok").click(function(){
   $("select").attr('disabled', true);
  //$("input[name^='invoice']").attr('disabled', false);
  $("aaaaa").attr('disabled', true);
});
$("#nok").click(function(){
  //$("select").attr('disabled', false);
  //$("input[name^='invoice']").attr('disabled', false);
});
$("#foo").click(function(){
alert("Done");
});
$('option').attr('disabled',false);
Output 300px

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