ドキュメント

Selectors/enabled

From jQuery JavaScript Library

Jump to: navigation, search

« Back to Selectors

:enabled

Matches all elements that are enabled.
Examples:

Finds all input elements that are enabled.

$("input:enabled").val("this is it");

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
  
  <script>
  $(document).ready(function(){
    $("input:enabled").val("this is it");
  });
  </script>
  
</head>
<body>
  <form>
    <input name="email" disabled="disabled" />
    <input name="id" />
  </form>
</body>
</html>

NameType