Skip to content

Instantly share code, notes, and snippets.

@dgmike
Created May 12, 2010 12:25
Show Gist options
  • Select an option

  • Save dgmike/398517 to your computer and use it in GitHub Desktop.

Select an option

Save dgmike/398517 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Select</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script src="seu_javascript.js" type="text/javascript"></script>
</head>
<body>
<select id="select_transporte" name="transporte">
<option>-- Selecione --</option>
<option value="carro">Carro</option>
<option value="moto">Moto</option>
</select>
</body>
</html>
$(function(){
$('#select_transporte').change(function(){
$(this).attr('disabled', 'disabled');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment